Interview Prep/GitHub Actions/Permissions, Tokens & Secrets

`Error: HttpError: Resource not accessible by integration` when uploading SARIF to code scanning.

IntermediateTroubleshootingPermissions, Tokens & Secrets
Answer

Likely causes → Missing security-events: write; on private repos, also actions: read for the upload action to read run info, and code scanning (GitHub Advanced Security) not enabled.

Diagnose → Check permissions block and repo security settings.

Fix →

permissions:
  contents: read
  security-events: write
  actions: read

Prevent → Use a shared scan workflow with correct permissions baked in.

All GitHub Actions questions Roadmap: GitHub Actions

More on Permissions, Tokens & Secrets