Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add repository scan #976

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Repository configuration analysis
#

# NOTES:
# This workflow uses PSRule.
# You can read more about these linting tools and configuration options here:
# PSRule - https://aka.ms/ps-rule and https://github.com/Microsoft/PSRule.Rules.GitHub

name: Repository
on:
push:
branches: [main, 'release/*']
pull_request:
branches: [main, 'release/*']
schedule:
- cron: '24 22 * * 0' # At 10:24 PM, on Sunday each week
workflow_dispatch:

jobs:
repo:
name: Repository configuration
runs-on: ubuntu-latest
# if: github.repository == 'microsoft/PSRule'
permissions:
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Run PSRule analysis
uses: Microsoft/[email protected]
with:
modules: PSRule.Rules.GitHub
outputFormat: Sarif
outputPath: reports/ps-rule-results.sarif
env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload results to security tab
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: reports/ps-rule-results.sarif
Loading