Repository navigation
Fix(make): Drop literal quotes from -C argument - #276
Merged
ModeSevenIndustrialSolutions merged 1 commit intoOct 1, 2026
Conversation
ModeSevenIndustrialSolutions
requested review from
a team
and
a balanced review from Copilot
October 1, 2026 07:22
Since make-action v0.1.5 (bumped in lfreleng-actions#265), every build with make: true and a path_prefix fails before any make target runs: make: *** "project": No such file or directory. Stop. The prepare step wrapped path_prefix in escaped double quotes. That only worked because make-action v0.1.4 interpolated make_args into its script source, where bash quote removal stripped them again. v0.1.5 resolved a zizmor template-injection finding by passing make_args through an environment variable instead; the unquoted expansion that follows word-splits but performs no quote removal, so make received the quotes literally. Pass the directory bare, matching the unquoted -C form make-action itself generates. That expansion also performs pathname expansion, so whitespace would split path_prefix and glob characters could rewrite it: with directories literal[1] and literal1, -C literal[1] becomes -C literal1 and make runs in the wrong project. When make is enabled, reject a path_prefix containing whitespace, *, ? or [ during setup, before any purge or build work starts. Add self-contained regression tests to the tests job: a make target that must run inside path_prefix, and strict expected-failure runs for whitespace and glob prefixes whose sentinel files prove the rejection happened up front. Coverage of the make path no longer depends solely on an external project listed in the MULTI_ARCH_TEST_PROJECTS repository variable. Document the -C behaviour and the restriction in the README. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
ModeSevenIndustrialSolutions
force-pushed
the
fix/make-path-prefix-quoting
branch
from
October 1, 2026 09:10
c0843f8 to
a75514f
Compare
zxiiro
approved these changes
Oct 1, 2026
zxiiro
left a comment
Contributor
There was a problem hiding this comment.
🤖 Auto-approved by agent: reviewed workflow/code change for security and CI/CD impact, found low risk. Drops literal quotes around make -C path_prefix (make-action word-splits unquoted) and rejects whitespace/glob path_prefix when make=true; additive safety, no new permissions/secrets.
ModeSevenIndustrialSolutions
merged commit Oct 1, 2026
48d2e03
into
lfreleng-actions:main
11 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes the
make+path_prefixregression that has keptmainredsince 8 September. Every build with
make: trueand apath_prefixfails before any make target runs:
Failing run:
https://github.com/lfreleng-actions/python-build-action/actions/runs/36745751407/job/109991397311
Root cause
The
Prepare make argumentsstep wrappedpath_prefixin escapeddouble quotes (
-C "project"). That worked by accident:${{ inputs.make_args }}directlyinto its script source, giving
make_args="-C "project" deps-nss ...".Bash parsed that line and quote removal stripped the inner quotes.
finding by passing
make_argsthrough an environment variable andexpanding it unquoted (
"$make_cmd" $make_args). Word splitting doesnot perform quote removal, so make received
"project", quotesincluded.
7a18f03e4e12f3make-actionv0.1.5 is behaving as documented: its README example andits own auto-generated form are both an unquoted
-C <path>. The fixtherefore belongs in this action.
Changes
action.yamlPrepare make arguments: pass the directory bare (-C ${path_prefix}).Setup action/environment: whenmakeis true, reject apath_prefixcontaining whitespace or glob characters (*,?,[).The unquoted expansion in make-action both word-splits and
pathname-expands, so whitespace would split the path and a glob could
rewrite it. For example, with directories
literal[1]andliteral1,-C literal[1]becomes-C literal1and make runs in the wrongproject. The check runs before any purge or build work starts.
.github/workflows/testing.yaml: self-contained regression testsin the
testsjob.setup.cfg-only fixture, with a targetthat must run inside
path_prefix.prefix. Each directory holds a sentinel that
purge_artefact_pathwould delete, so the test passes only if the action failed and
stopped before doing any work.
Coverage of the make path previously depended solely on an external
project in the
MULTI_ARCH_TEST_PROJECTSrepository variable.README.md: document the-C <path_prefix>behaviour and thewhitespace/glob restriction.
Validation
run:scripts (theSetup action/environmentandPrepare make argumentssteps, fed into make-action v0.1.5's script)against temporary projects:
upstream/mainreproducesmake: *** "project": No such file or directory.project,project/andsub/dirliteral[1](with aliteral1decoy present),a*b,a?bandspace dirduring setup, with the sentinel intactmake: false, whitespace and glob prefixes behave as beforeprek run --fileson all changed files: passedzizmor --persona auditor action.yaml .github/workflows/testing.yaml:no findings
aislop-gate.sh upstream/main: clean (3 files gated)