Skip to content

ci(security): add informational security checks - #2930

Open
alangou wants to merge 1 commit into
mainfrom
2837-p0-repository-and-pr-gates-tighten-ownership-and-workflow-permissions-add-dependency-review-codeql-zizmoractionlint-secret-scanning-push-protection-and-expiring-exceptions
Open

ci(security): add informational security checks#2930
alangou wants to merge 1 commit into
mainfrom
2837-p0-repository-and-pr-gates-tighten-ownership-and-workflow-permissions-add-dependency-review-codeql-zizmoractionlint-secret-scanning-push-protection-and-expiring-exceptions

Conversation

@alangou

@alangou alangou commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Add observation-mode security checks for GitHub Actions, dependency changes, and the Rust/SDK codebase. Findings remain informational while scanner, configuration, and build failures stay visible.

Related Issue

Refs #2837

This PR implements the initial scanner-observation tranche and does not close the broader repository-hardening issue.

Changes

  • add pinned Actionlint and Zizmor tooling with High-severity workflow reports and retained artifacts
  • add Dependency Review in warn-only mode with a neutral Dependency Graph availability preflight
  • add non-blocking CodeQL analysis for Rust and the Go, Python, and TypeScript SDKs
  • document the GitHub-hosted security checks and their non-required status

Testing

  • mise run pre-commit passes
  • Unit tests added/updated — N/A; mise run ci passes the existing suite
  • E2E tests added/updated — N/A; no runtime or deployment behavior changed
  • mise run security:actionlint
  • mise run security:zizmor

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@copy-pr-bot

copy-pr-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown

@alangou

alangou commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 1a6053e

@alangou
alangou force-pushed the 2837-p0-repository-and-pr-gates-tighten-ownership-and-workflow-permissions-add-dependency-review-codeql-zizmoractionlint-secret-scanning-push-protection-and-expiring-exceptions branch from 1a6053e to 228bf5a Compare August 26, 2026 10:29
@alangou

alangou commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 228bf5a

@alangou
alangou force-pushed the 2837-p0-repository-and-pr-gates-tighten-ownership-and-workflow-permissions-add-dependency-review-codeql-zizmoractionlint-secret-scanning-push-protection-and-expiring-exceptions branch from 228bf5a to 8e2b40d Compare August 26, 2026 12:46
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@alangou
alangou marked this pull request as ready for review August 26, 2026 14:16
Comment thread .github/dependabot.yml Outdated
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.name == 'CodeQL' &&
github.event.workflow_run.head_repository.full_name != github.repository &&
github.event.workflow_run.pull_requests[0].number != null

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/orgs/community/discussions/25220

If this is still the case this report upload might not work

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch fixed. Fork PRs now upload SARIF directly so we no longer depend on workflow_run.pull_requests

Comment thread .github/workflows/codeql.yml Outdated
if: >-
steps.analyze.outcome == 'success' &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Dependabot PRs are treated like fork PRs for GITHUB_TOKEN permissions, but their head repository still equals github.repository. This condition therefore runs upload-sarif with a read-only token, so the security-events: write upload will fail. Please exclude Dependabot here and route its retained SARIF through the trusted workflow_run uploader as another restricted-token context.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Scanning explicitly allows SARIF uploads from pull_request runs including Dependabot even with a read-only token (https://docs.github.com/en/code-security/reference/code-scanning/troubleshoot-analysis-errors/resource-not-accessible#confirming-the-cause-of-the-error). However I simplified the workflow to upload directly.

@alangou
alangou force-pushed the 2837-p0-repository-and-pr-gates-tighten-ownership-and-workflow-permissions-add-dependency-review-codeql-zizmoractionlint-secret-scanning-push-protection-and-expiring-exceptions branch 2 times, most recently from 8d167d2 to 44ccaba Compare August 27, 2026 09:41
Signed-off-by: Adrien Langou <alangou@nvidia.com>
@alangou
alangou force-pushed the 2837-p0-repository-and-pr-gates-tighten-ownership-and-workflow-permissions-add-dependency-review-codeql-zizmoractionlint-secret-scanning-push-protection-and-expiring-exceptions branch 2 times, most recently from adb5b9c to e268047 Compare August 27, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants