chore: onboard stepsecurity and apply security best practice #585
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 pull request focuses on improving the security and reliability of the GitHub Actions workflows by hardening the CI runners, restricting network egress, and pinning all third-party action dependencies to specific commit SHAs. These changes help prevent supply chain attacks and ensure consistent, auditable builds.
Detail
Key changes include:
Security hardening:
step-security/harden-runneraction to all major workflows (ci.yml,coverage.yml,bytecode-verification.yml,check-pr.yml) to block or audit outbound network calls and enforce a global allowed endpoints policy. [1] [2] [3] [4] [5]permissions: id-token: writefor jobs to enable the use of GitHub OIDC tokens, which are often required by hardened runners and for secure authentication in CI/CD pipelines. [1] [2] [3] [4]Dependency management and reproducibility:
actions/checkout,actions/download-artifact,actions/upload-artifact,mikepenz/action-junit-report,sidx1024/report-nyc-coverage-github-action, andactions/github-script) to specific commit SHAs to prevent unexpected changes and improve build reproducibility. [1] [2] [3] [4] [5] [6] [7] [8]These updates collectively strengthen the security posture of the CI/CD pipelines and make workflows more robust and predictable.
Testing
Documentation
Requested Reviewers: @mention