Repository navigation
test(project-status): guard container/services options and working-directory against expressions (#1077) - #1079
Conversation
…rectory against expressions (#1077) Extend the expression guard from run:/shell: to jobs.<id>.container.options, jobs.<id>.services.<id>.options and working-directory (step and defaults.run), matched by path suffix so env: names stay unguarded. Add a rejected and an accepted fixture per key, cross-checked against yaml.safe_load, and drop the "yaml is in no extra" wording from the scanner docstrings.
|
Cross-review verdict on
|
|
Coverage: 88.74% (unit tier, Python 3.14,
Per-file detail: the |
make pylint,make mypy,make isort) — not run;pycodestyleand pylint E/W on the file show nothing newmake testpasses, and a test case covers the change —tests/projectpasses (379 passed, 1 skipped); full suite not runWhat is the purpose of your pull request?
test— tests onlyDescription of your pull request and other information
The
project-status.ymlguard now rejects${{ }}underjobs.<id>.container.options,jobs.<id>.services.<id>.optionsandworking-directory(step anddefaults.run), as well asrun:/shell:. It matches by path suffix rather than last key, becauseoptionsandworking-directoryare also legalenv:names, andenv:is the safe channel. The workflow itself does not change.Tests: one rejected and one literal fixture per key, plus an
env: options:case that must pass. All are cross-checked againstyaml.safe_load(ran, PyYAML 6.0.3). With the guard reverted, the five new positive subtests fail (the expression in options:/working-directory: went unseen). Thescan()docstrings no longer claim PyYAML is in no extra (see #1078).Closes #1077