Add Kusari Security Scanner #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Kusari Security Scan | |
| on: | |
| # Run on pull requests | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| # Run when triggered via API | |
| workflow_dispatch: | |
| inputs: | |
| pr_number: | |
| description: 'Pull request number' | |
| required: false | |
| sha: | |
| description: 'Commit SHA to analyze' | |
| required: false | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| security-scan: | |
| name: Run Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # If triggered by workflow_dispatch with a SHA, use that SHA | |
| ref: ${{ github.event.inputs.sha || github.sha }} | |
| - name: Run Security Scanner | |
| uses: Kusari-Sandbox/kusari-security-data@v1.0.0-beta1 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload scan results as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: security-scan-results | |
| path: security-scan-results.json | |
| retention-days: 3 |