Skip to content

ci: harden security-review.yml against script injection - #3365

Merged
geedo0 merged 1 commit into
aws:mainfrom
nebeid:harden-security-review-script-injection
Jul 24, 2026
Merged

geedo0 merged 1 commit into
aws:mainfrom
nebeid:harden-security-review-script-injection

Conversation

@nebeid

@nebeid nebeid commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Issues:

Addresses V2265233159

Description of changes:

Continuation of 8afd2f6, extending the same script-injection hardening to security-review.yml.

Directly interpolating ${{ github.event.* }} context expressions into run: shell bodies lets Actions splice them in as text before the shell runs โ€” a script-injection risk. This PR hoists each flagged value into the step's env: block and references it as a quoted shell variable instead. Behavior is unchanged.

  • Update commit status: hoist github.event.repository.name, github.event.pull_request.number, and github.event.pull_request.head.sha into env.
  • Post review comment: hoist github.event.repository.name and github.event.pull_request.number into env.

Call-outs:

  • This workflow runs on pull_request_target, so hardening these interpolations matters even though the flagged fields (repo name, PR number, commit SHA) are format-constrained.
  • ${{ github.repository }} is left inline โ€” it is not github.event.* attacker-influenced input.

Testing:

CI-config-only, no product code impact. File parses as valid YAML; no ${{ github.event.* }} interpolations remain in any run: body.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

Move untrusted github.event.* values (repository.name,
pull_request.number, pull_request.head.sha) into env: vars and
reference them as quoted shell variables instead of interpolating
${{ }} templates directly into run: blocks.

Same hardening applied in
aws@8afd2f6
which covered the other workflows but not security-review.yml.
@nebeid
nebeid requested a review from a team as a code owner July 20, 2026 22:37
@github-actions

Copy link
Copy Markdown
Contributor

๐Ÿ”’ Security Review โ€” View Report

Please review before merging.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

โœ… All modified and coverable lines are covered by tests.
โœ… Project coverage is 78.20%. Comparing base (b06d89b) to head (cbf9e16).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3365   +/-   ##
=======================================
  Coverage   78.20%   78.20%           
=======================================
  Files         695      695           
  Lines      124172   124172           
  Branches    17238    17239    +1     
=======================================
+ Hits        97104    97106    +2     
+ Misses      26147    26145    -2     
  Partials      921      921           

โ˜” View full report in Codecov by Harness.
๐Ÿ“ข Have feedback on the report? Share it here.

๐Ÿš€ New features to boost your workflow:
  • โ„๏ธ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nebeid
nebeid requested a review from justsmth July 22, 2026 13:21
@geedo0
geedo0 merged commit 78cb2e0 into aws:main Jul 24, 2026
656 of 662 checks passed
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
aws-lc 5.5.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## What's Changed
* Restore ADX/AVX2 code paths under OPENSSL_SMALL via new MY_ASSEMBLER_IS_TOO_OLD_FOR_ADX_AVX2 flag by @justsmth in aws/aws-lc#3368
* Include <openssl/cipher.h> from <openssl/hmac.h> for OpenSSL compat by @justsmth in aws/aws-lc#3371
* ci: harden security-review.yml against script injection by @nebeid in aws/aws-lc#3365
* Fix flaky s_client cipher tests by using better ciphers by @justsmth in aws/aws-lc#3373
* chore: simplify the api docs workflow by @dougch in aws/aws-lc#3186
* Add tests for RSASSA-PSS with SHA-3 digest and MGF1 by @WillChilds-Klein in aws/aws-lc#3377
* Link header documentation from README by @WillChilds-Klein in aws/aws-lc#3378
* Rename autofix reasoning role to AwsLcGitHubActionsBedrockRole by @tianyiy-tim in aws/aws-lc#3376
* ci: pin openssh required job by @dougch in aws/aws-lc#3387
* delocate: Drop redundant `-dI` flag by @hanno-becker in aws/aws-lc#3384
* Add Neoverse-V3 (Graviton5) detection and dispatch by @nebeid in aws/aws-lc#3374
* Bump ring from 0.17.8 to 0.17.14 in /tests/ci/lambda by @dependabot[bot] in aws/aws-lc#3375
* Fix docker image dependencies and update octocrab initialization by @prasden in aws/aws-lc#3388
* Update FIPS.md by @justsmth in aws/aws-lc#3382
* Bump urllib3 from 2.6.3 to 2.7.0 in /tests/ci by @dependabot[bot] in aws/aws-lc#3372
* Add MinGW shared-library Windows CI coverage by @justsmth in aws/aws-lc#3398
* Update concurrency in `security-review` by @nhatnghiho in aws/aws-lc#3403
* Enable linker garbage collection for non-FIPS static builds by @justsmth in aws/aws-lc#3397
* Prepare 5.5.0 by @justsmth in aws/aws-lc#3401

## New Contributors
* @tianyiy-tim made their first contribution in aws/aws-lc#3376

**Full Changelog**: https://github.com/aws/aws-lc/compare/v5.4.0...v5.5.0</pre>
  <p>View the full release notes at <a href="https://github.com/aws/aws-lc/releases/tag/v5.5.0">https://github.com/aws/aws-lc/releases/tag/v5.5.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!15934

This branch was successfully deployed

No deployments
auto-approve โ€” cbf9e164 Deployed Jul 24, 2026 by geedo0 via execute #484
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.

4 participants