Skip to content

fix(buildspec): fail install when jq or curl cannot be installed - #44

Open
Paramjeet-singh-neu wants to merge 1 commit into
trustabl:mainfrom
Paramjeet-singh-neu:fix/buildspec-fail-closed-install
Open

fix(buildspec): fail install when jq or curl cannot be installed#44
Paramjeet-singh-neu wants to merge 1 commit into
trustabl:mainfrom
Paramjeet-singh-neu:fix/buildspec-fail-closed-install

Conversation

@Paramjeet-singh-neu

Copy link
Copy Markdown

Summary

The CodeBuild install phase hid a failed `jq` / `curl` install behind `|| true`. On an image that does not already have them, the scan then died later with a confusing command-not-found (or, if the script's own fallbacks also fail, reported a score from a run that never started).

Fail the install phase instead so CodeBuild stops at the missing toolchain. Also list `BRANCH` and `DEBUG` in the input comment — both are read by `scan/trustabl-scan.sh`, neither was documented next to the other env vars. Complementary to the README `BRANCH`/`DEBUG` PR; this is the file CodeBuild users actually copy.

Does not touch `scan/trustabl-scan.sh`.

Test plan

  • On `aws/codebuild/standard:7.0` (jq and curl already present): install is a no-op, scan runs
  • On an image missing jq, with yum/apt able to install it: install phase succeeds
  • On an image missing jq, with neither yum nor apt: install phase fails (no scan)

Made with Cursor

The install commands hid yum/apt failure behind || true, so a missing
jq or curl became a confusing scan error (or a score from a run that
never started). Fail the install phase instead. Also list BRANCH and
DEBUG in the input comment — both are read by the scanner, neither
was documented next to the other CodeBuild env vars.

Co-authored-by: Cursor <cursoragent@cursor.com>
sheel-PBM added a commit to sheel-PBM/trustabl-aws that referenced this pull request Aug 24, 2026
Leave install fail-closed to trustabl#44 and repo-wide CI to the dedicated
lint PRs. This change is REPORT_ONLY plus Security Hub ASFF only.

Co-authored-by: Cursor <cursoragent@cursor.com>
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