Restrict code quality workflow permissions - #16
Merged
Liang-Chun Tsai (ltsai-dev) merged 3 commits intoAug 18, 2026
Conversation
Pin workflow actions to immutable commits and install pre-commit from a fully hashed lock file. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7334a342-1040-40cb-a01e-81d4db18579d
Liang-Chun Tsai (ltsai-dev)
requested review from
a team
and
a lite review from Copilot
August 18, 2026 20:48
Copilot started reviewing on behalf of
Liang-Chun Tsai (ltsai-dev)
August 18, 2026 20:49
View session
added 2 commits
August 18, 2026 13:52
Keep the top-level token permission restriction and remove medium-severity dependency pinning changes from this pull request. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7334a342-1040-40cb-a01e-81d4db18579d
Add an explicit top-level deny-all permission policy while retaining the job's read-only contents permission. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7334a342-1040-40cb-a01e-81d4db18579d
There was a problem hiding this comment.
Pull request overview
This PR hardens the repository’s GitHub Actions security posture by pinning third-party actions to immutable commit SHAs, tightening GITHUB_TOKEN permissions, and making the code-quality Python tooling install reproducible via a hashed dependency lockfile.
Changes:
- Pinned referenced GitHub Actions in several workflows from mutable tags (e.g.,
@v7) to specific commit SHAs. - Reduced default workflow token permissions (using
permissions: {}) and scoped job permissions more tightly (notably in dependency review and code quality workflows). - Replaced ad-hoc
pipinstalls/upgrades withpip --require-hashesusing a dedicated, fully-hashed requirements lock for pre-commit tooling.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/test-thinkingbox-tools.yml | Pins actions/checkout and astral-sh/setup-uv to commit SHAs for deterministic workflow dependencies. |
| .github/workflows/test-tb-business-ops-servers-202606.yml | Same action pinning hardening for the TB business ops servers test workflow. |
| .github/workflows/scorecard.yml | Pins Scorecard-related actions to SHAs (checkout, scorecard-action, upload-sarif). |
| .github/workflows/dep-review.yml | Moves to default-deny workflow permissions and pins checkout + dependency-review action to SHAs. |
| .github/workflows/codeql.yml | Pins CodeQL actions to SHAs for deterministic security scanning dependencies. |
| .github/workflows/code-quality.yml | Defaults workflow permissions to none, pins actions to SHAs, and installs tooling via a hashed requirements lock. |
| .github/workflows/requirements-code-quality.txt | Adds a fully hashed, pinned dependency lockfile used by the code-quality workflow. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
permissionspolicy to the code-quality workflowcontentspermissionHigh-severity alerts
mainruleset16468765Alert #2 should transition to fixed after merge and the next Scorecard run.