Repository navigation
chore(security): add Dependabot cooldown, grouped updates, and pin Python deps - #190
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens dependency automation and CI dependency installation to make updates more controlled (Dependabot grouping/cooldown) and installs more deterministic (pinned tooling / hash-verified docs deps).
Changes:
- Add Dependabot cooldown rules and standardize GitHub Actions updates into a single group.
- Pin
pip/pipenvversions in the main workflow and switch to lockfile-drivenpipenv sync --dev. - Switch docs workflow installs to
pip install -r requirements-docs.txt --require-hashesand add a hash-pinnedrequirements-docs.txt.
Show a summary per file
| File | Description |
|---|---|
requirements-docs.txt |
Adds a hash-pinned docs dependency set for pip --require-hashes. |
.github/workflows/main.yml |
Pins installer tooling and uses pipenv sync --dev for reproducible CI installs. |
.github/workflows/docs.yml |
Switches docs CI install path to use the hash-pinned requirements file. |
.github/dependabot.yml |
Adds cooldown settings and standardizes grouping for GitHub Actions updates. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 2
|
@copilot fix the failing CI (https://github.com/advanced-security/policy-as-code/actions/runs/26190333329/job/77256285147?pr=190) for this PR |
Fixed in f9e69ce. The CI failure was caused by pinning |
Dependency ReviewThe following issues were found:
License Issuesrequirements-docs.txt
OpenSSF ScorecardScorecard details
Scanned Files
|
Fixed in 83c9cf1. I addressed both failing runs:
|
Fixed in 17355aa. Addressed the linked failures:
|
Fixed in dfe3172. I addressed the linked failures by:
|
The e2e-tests and action-test jobs test external, repo-specific state (live Code Scanning/Dependabot/Secret Scanning alerts and the testing token's validity) rather than the correctness of a given change. Mark them continue-on-error so a pre-existing alert, an expired testing token, or a transient upstream API error doesn't fail the Main workflow for unrelated PRs. Builds on the check-secret/skip-when-missing handling already added in #190.
#186) * Fix SyntaxWarning in __version__.py by using raw f-string Co-authored-by: felickz <1760475+felickz@users.noreply.github.com> * Mark integration test jobs as continue-on-error The e2e-tests and action-test jobs test external, repo-specific state (live Code Scanning/Dependabot/Secret Scanning alerts and the testing token's validity) rather than the correctness of a given change. Mark them continue-on-error so a pre-existing alert, an expired testing token, or a transient upstream API error doesn't fail the Main workflow for unrelated PRs. Builds on the check-secret/skip-when-missing handling already added in #190. * Gate CLI workflow on POLICY_AS_CODE_TESTING_TOKEN availability Per automated review feedback on #186: cli.yml runs the same integration CLI test on every push/PR but passed the testing token unguarded. When the secret isn't available (e.g. fork PRs), the empty token reaches ghascompliance/__main__.py:89's 'if not arguments.github_token: raise Exception(...)' and hard-fails the Ubuntu/Windows matrix job. Apply the same env-var gate + skip step used in main.yml's e2e-tests/ action-test jobs, and mark the job continue-on-error since it also exercises live external state (the testing token, the policy-as-code-testing repo). --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
This updates dependency automation and Python install paths to enforce safer, more predictable updates across Dependabot and CI workflows. It adds Dependabot cooldown/grouping rules, pins workflow installer tooling, and moves docs installs to a hash-verified requirements file.
Dependabot policy hardening
cooldown.default-days: 3to eachupdatesentry in.github/dependabot.yml.github-actionsgrouping to a single catch-all group:groups.actions.patterns: ["*"].Main workflow dependency pinning
.github/workflows/main.yml, replaced unpinned bootstrap install with pinned versions ofpipandpipenv.pipenv installusage withpipenv sync --devfor lockfile-driven installs.Docs workflow hash verification
.github/workflows/docs.yml, replaced direct package install with:pip install -r requirements-docs.txt --require-hashes.requirements-docs.txtgenerated viauv pip compile --generate-hashes(hash-pinned dependency set).Lockfile expectation
Pipfile.lockremains committed in-repo and is used by the updated workflow path.