-
Notifications
You must be signed in to change notification settings - Fork 286
chore(ci): fix dependabot workflows and drain PR backlog #2044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| time: "10:00" | ||
| open-pull-requests-limit: 5 | ||
| labels: | ||
| - dependencies | ||
| groups: | ||
| gh-actions: | ||
| patterns: | ||
| - "*" | ||
| - package-ecosystem: docker | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| time: "10:00" | ||
| open-pull-requests-limit: 5 | ||
| labels: | ||
| - dependencies | ||
| groups: | ||
| docker: | ||
| patterns: | ||
| - "*" | ||
| - package-ecosystem: gomod | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| time: "10:00" | ||
| open-pull-requests-limit: 10 | ||
| labels: | ||
| - dependencies | ||
| groups: | ||
| cosmos-sdk: | ||
| patterns: | ||
| - "cosmossdk.io/*" | ||
| - "github.com/cosmos/*" | ||
| otel: | ||
| patterns: | ||
| - "go.opentelemetry.io/*" | ||
| gomod-minor-patch: | ||
| update-types: | ||
| - minor | ||
| - patch | ||
| - package-ecosystem: pip | ||
| directory: "/integration_tests" | ||
| schedule: | ||
| interval: weekly | ||
| open-pull-requests-limit: 5 | ||
| labels: | ||
| - dependencies | ||
| groups: | ||
| pip-minor-patch: | ||
| update-types: | ||
| - minor | ||
| - patch | ||
| - package-ecosystem: pip | ||
| directory: "/testground/benchmark" | ||
| schedule: | ||
| interval: weekly | ||
| open-pull-requests-limit: 5 | ||
| labels: | ||
| - dependencies | ||
| groups: | ||
| pip-minor-patch: | ||
| update-types: | ||
| - minor | ||
| - patch | ||
| - package-ecosystem: npm | ||
| directory: "/integration_tests/contracts" | ||
| schedule: | ||
| interval: weekly | ||
| open-pull-requests-limit: 5 | ||
| labels: | ||
| - dependencies | ||
| groups: | ||
| npm-minor-patch: | ||
| update-types: | ||
| - minor | ||
| - patch |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
| name: "Dependency Review" | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "**/*.go" | ||
| - "**/go.mod" | ||
| - "**/go.sum" | ||
| merge_group: | ||
|
|
||
| permissions: | ||
|
|
@@ -11,11 +15,11 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: "Checkout Repository" | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@v6 | ||
| - name: "Setup Go" | ||
| uses: actions/setup-go@v5 | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: "1.25" | ||
| go-version: "1.25.10" | ||
| check-latest: true | ||
| - name: "Dependency Review" | ||
| uses: actions/dependency-review-action@v4 | ||
|
|
@@ -26,22 +30,30 @@ jobs: | |
| - name: "Go vulnerability check" | ||
| id: govuln | ||
| run: | | ||
| # Run the vulnerability check and capture its output (ignoring non-zero exit codes) | ||
| # Known unfixable vulns can be appended here (space-separated GO-IDs). | ||
| # GO-2025-3443 is a legacy allowlisted entry. Any other GO-ID fails the job. | ||
| ALLOWED="GO-2025-3443" | ||
|
|
||
| if ! make vulncheck 2>&1 | tee govulncheck-output.txt ; then | ||
| echo "govulncheck failed to execute" | ||
| exit 1 | ||
| fi | ||
|
Comment on lines
37
to
40
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Locate vulncheck target definition =="
rg -n --type=make -C3 '(^|\s)vulncheck\s*:' Makefile **/Makefile || true
echo
echo "== Locate govulncheck invocations in repo =="
rg -n -C3 '\bgovulncheck\b|\bvulncheck\b'Repository: crypto-org-chain/cronos Length of output: 712 🏁 Script executed: # Find and inspect the actual workflow file
find . -name "dependencies-review.yml" -type fRepository: crypto-org-chain/cronos Length of output: 111 🏁 Script executed: # Read the workflow file to see the full context around lines 37-40 and 42-59
cat -n .github/workflows/dependencies-review.yml | sed -n '25,65p'Repository: crypto-org-chain/cronos Length of output: 1610 🌐 Web query:
💡 Result: govulncheck exit codes (golang vulnerability checker) - Exit code 0: no vulnerabilities found. [1] - Exit code 3: vulnerabilities found. [1] - Exit code 0 even when vulnerabilities are detected if -json is provided (i.e., success regardless of number of detected vulnerabilities). [2][1] Notes / CI implication: - If you run govulncheck in CI with -json output, you should not rely on the process exit code to fail the build when vulnerabilities are detected, because -json causes exit code 0 regardless of findings. [2] Citations:
Allowlist logic never executes due to early exit on When Fix: Capture the Suggested fix- if ! make vulncheck 2>&1 | tee govulncheck-output.txt ; then
- echo "govulncheck failed to execute"
- exit 1
- fi
+ set +e
+ make vulncheck 2>&1 | tee govulncheck-output.txt
+ vulncheck_status=$?
+ set -e
+
+ # Exit code 3 means vulnerabilities found (expected); proceed to allowlist check.
+ # Exit code 0 means no vulnerabilities (success).
+ # Any other code indicates execution failure.
+ if [ "$vulncheck_status" -ne 0 ] && [ "$vulncheck_status" -ne 3 ]; then
+ echo "govulncheck failed to execute (exit=$vulncheck_status)"
+ exit 1
+ fi🤖 Prompt for AI Agents |
||
|
|
||
| # Extract vulnerability identifiers from the output (e.g., GO-2025-3443) | ||
| vulnerabilities=$(grep -o 'GO-[0-9]\{4\}-[0-9]\+' govulncheck-output.txt | sort | uniq) | ||
| vulnerabilities=$(grep -oE 'GO-[0-9]{4}-[0-9]+' govulncheck-output.txt | sort -u) | ||
| echo "Detected vulnerabilities: $vulnerabilities" | ||
|
|
||
| # Check if any vulnerability other than GO-2025-3443 exists | ||
| for vuln in $vulnerabilities; do | ||
| if [ "$vuln" != "GO-2025-3443" ]; then | ||
| echo "Found vulnerability $vuln, failing..." | ||
| found=false | ||
| for allow in $ALLOWED; do | ||
| if [ "$vuln" = "$allow" ]; then | ||
| found=true | ||
| break | ||
| fi | ||
| done | ||
| if [ "$found" = false ]; then | ||
| echo "Unallowed vulnerability $vuln found; failing." | ||
| exit 1 | ||
| fi | ||
| done | ||
|
|
||
| echo "Only known vulnerability (GO-2025-3443) present. Continuing." | ||
| echo "Only known allowlisted vulnerabilities present. Continuing." | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependency name parser is too narrow and skips valid module updates
On Line 41, parsing only
github.com/...misses valid modules likecosmossdk.io/...orgo.opentelemetry.io/..., which then forcesskip=trueand bypasses Line 56.💡 Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents