Security hardening: Renovate, SHA-pinned actions, least-privilege permissions#1524
Merged
Security hardening: Renovate, SHA-pinned actions, least-privilege permissions#1524
Conversation
b20fa9f to
212b2ed
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the repo’s CI/CD and supply-chain posture by migrating dependency automation to Renovate, pinning Actions to immutable SHAs, and tightening workflow permissions/guards while adding a bot-only dist rebuild path.
Changes:
- Add self-hosted Renovate configuration and scheduled workflow; remove Dependabot config.
- Pin GitHub Actions to SHAs and introduce least-privilege permissions across key workflows.
- Add a Renovate-only
commit-distjob and token masking in the action runtime.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.ts | Masks provided token to prevent accidental log disclosure in CI. |
| renovate.json | Adds Renovate configuration with digest pinning and vulnerability alert settings. |
| package.json | Updates devDependencies and adds security-related overrides. |
| .github/workflows/renovate.yml | Introduces scheduled Renovate workflow. |
| .github/workflows/codeql-analysis.yml | Pins CodeQL and checkout actions to SHAs. |
| .github/workflows/build.yml | Adds least-privilege permissions, audit steps, dist auto-rebuild for Renovate, fork guard, release attestation. |
| .github/dependabot.yml | Removes Dependabot configuration in favor of Renovate. |
| .devcontainer/devcontainer.json | Pins devcontainer image by digest and removes a broken feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The test job uses the local action which needs to create check runs and post PR comments, requiring these permissions that were missing after the security hardening changes.
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
This PR applies a comprehensive set of CI/CD and supply chain security hardening measures across the repository.
Dependency Management
renovate.json+.github/workflows/renovate.yml): enables digest pinning for container images, OSV vulnerability alerts, and 0-day vulnerability patching via immediate PRs rather than weekly batch updates.GitHub Actions Hardening
permissions:blocks added to every workflow job, following the principle of minimal access.Workflow Improvements
commit-distjob added for automated Renovate dist rebuilds, ensuring compiled artifacts stay in sync after dependency updates without manual intervention.Source Code & Package Security
core.setSecret(token)secret masking added insrc/main.tsto prevent token values from leaking into GitHub Actions logs.brace-expansion ^5.0.5CVE override added inpackage.jsonto address known vulnerability viaoverridesfield.Developer Experience
with: token:inputs rather than environment variables, aligning with GitHub Actions security best practices.Test plan