Skip to content

chore(layers): replace shell filesystem commands - #5596

Merged
svozza merged 1 commit into
mainfrom
chore/harden-layer-bundler
Aug 31, 2026
Merged

svozza merged 1 commit into
mainfrom
chore/harden-layer-bundler

Conversation

@dreamorosi

Copy link
Copy Markdown
Contributor

Summary

Replace shell-interpolated filesystem commands in the layer bundler with Node.js APIs. This clears the CodeQL finding and supports checkout paths containing spaces or shell metacharacters.

Changes

  • Use Node.js filesystem APIs for temporary directories, cleanup, file patching, and asset copying
  • Run npm and git commands with argument arrays instead of shell strings
  • Resolve local package tarballs from npm pack --json
  • Fix the trailing spaces in the AWS SDK and Smithy README cleanup patterns

Issue number: closes #5579


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Use Node filesystem APIs and argument-based subprocess calls in the layer bundler so checkout paths cannot alter shell commands. Fix the malformed README cleanup patterns while replacing shell glob expansion.

Fixes GH-5579
@svozza
svozza merged commit 19b9bda into main Aug 31, 2026
41 checks passed
@svozza
svozza deleted the chore/harden-layer-bundler branch August 31, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L PRs between 100-499 LOC

2 participants