Skip to content

Add upload-sarif input to make GitHub code scanning upload optional#20

Merged
derigel23 merged 4 commits into
mainfrom
copilot/add-disable-sarif-upload-option
May 21, 2026
Merged

Add upload-sarif input to make GitHub code scanning upload optional#20
derigel23 merged 4 commits into
mainfrom
copilot/add-disable-sarif-upload-option

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

The action always attempted SARIF upload to GitHub code scanning, which fails in repositories without GHAS. This PR adds an explicit opt-out so users can still run InspectCode and keep the report artifact without requiring Advanced Security.

  • Action behavior

    • Added new input: upload-sarif (default: true)
    • Updated SARIF upload step condition to require both:
      • format == 'Sarif'
      • upload-sarif == 'true'
    • Preserves current default behavior while enabling GHAS-free usage.
  • Documentation

    • Added upload-sarif to the configuration table.
    • Updated usage example to show disabling upload.
    • Clarified that security-events: write is unnecessary when SARIF upload is disabled.
  • CI smoke workflow

    • Updated smoke test invocation to run with format: "Sarif" and upload-sarif: "false" so the new path is exercised.
- uses: JetBrains/ReSharper-InspectCode@v0.13
  with:
    solution: ./YourSolution.sln
    format: Sarif
    upload-sarif: false

Copilot AI changed the title [WIP] Add option to disable GitHub Security (SARIF) upload Add upload-sarif input to make GitHub code scanning upload optional May 21, 2026
Copilot AI requested a review from derigel23 May 21, 2026 20:22
@derigel23 derigel23 marked this pull request as ready for review May 21, 2026 21:23
@derigel23 derigel23 merged commit 96fdc34 into main May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to disable GitHub Security (SARIF) upload

2 participants