Skip to content

Harden build pipeline: strict checksums, CodeQL, Dependabot, safer deliver.sh - #2

Merged
oraclefoo merged 1 commit into
masterfrom
devin/1790378037-security-hardening
Sep 25, 2026
Merged

oraclefoo merged 1 commit into
masterfrom
devin/1790378037-security-hardening

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

No vulnerable dependencies remain (OSV batch query over the full resolved test classpath — JUnit 6.1.3 and transitives — returns zero advisories after #1). So this PR closes the supply-chain and pipeline gaps instead:

  • deliver.sh: added set -euo pipefail, quoted "target/${NAME}-${VERSION}.jar", and replaced the backtick + grep "^[^\[]" scraping of help:evaluate with $(mvn -q help:evaluate -Dexpression=... -DforceStdout). Previously a failing mvn left NAME/VERSION empty and the script still ran java -jar target/-.jar, and unquoted expansion made the values word-split.
  • CI (.github/workflows/build.yml): mvn -B --strict-checksums clean verify on push/PR, so a tampered or corrupt artifact download fails the build instead of being silently accepted.
  • CodeQL (.github/workflows/codeql.yml) with security-extended, weekly plus on PR; least-privilege permissions: on both workflows.
  • Dependabot (.github/dependabot.yml) for maven, github-actions, and the Jenkins docker image.
  • Jenkinsfile: agent image pinned to maven:3.9.11-eclipse-temurin-17 (was floating 3.9), build cache mount changed from the host's root-owned /root/.m2 to $HOME/.m2, and a 30-minute pipeline timeout.

Verified locally (Maven 3.9.9 / JDK 17): mvn -B --strict-checksums clean verify passes, shellcheck jenkins/scripts/deliver.sh is clean, and deliver.sh runs end to end printing Hello World!.

Note: Dependabot alerts are currently disabled on this repo (GET /dependabot/alerts → 403), so the config above only drives version-update PRs until you enable Dependabot alerts + security updates in Settings → Code security.

Link to Devin session: https://app.devin.ai/sessions/8913315af198494dab7ed91724147f96
Open in Devin Desktop: https://app.devin.ai/desktop/session/8913315af198494dab7ed91724147f96?variant=devin
Requested by: @oraclefoo

…r.sh

Co-Authored-By: oraclefoo@yahoo.com <oraclefoo@yahoo.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@oraclefoo
oraclefoo merged commit 9de97ed into master Sep 25, 2026
2 checks passed

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 1 finding needs your review

Devin reviewed the finding on 7d53387 and left it for you. Click a finding below to jump to its comment.

For your review (1)

View all findings in Devin Review

Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread .github/dependabot.yml
Comment on lines +11 to +14
- package-ecosystem: docker
directory: "/jenkins"
schedule:
interval: weekly

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Jenkins image updates never run

Docker Dependabot finds no supported manifest under /jenkins because the Maven image exists only in a Jenkinsfile. Its weekly runs cannot update that image.

Learn more

Dependabot's docker ecosystem discovers image references in supported Docker manifests, not Jenkins Pipeline agent declarations. The configured directory contains Jenkinsfile and scripts/deliver.sh, so no dependency is available for this update entry.

Example: When maven:3.9.12-eclipse-temurin-17 becomes available, the weekly Docker job scans /jenkins, finds no Dockerfile, and opens no pull request for the pinned 3.9.11 tag.

Recommended fix: Use an update mechanism that supports Jenkinsfiles, or move the image declaration into a supported manifest consumed by the pipeline. Remove this Dependabot entry if neither approach is adopted, so the configuration does not promise ineffective coverage.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant