Repository navigation
fix(security): refuse GCONV_PATH, SHELLOPTS, BASHOPTS and PS4 from a caller, and archive the merged security changes - #2453
Conversation
The change 1469-audit-keys-leak-exit-code was still active on main. The archive adds its exit-code requirement to the config-commands spec. Refs #2433
The change 1492-drop-gh-go-trivy-ignores was still active on main. It has no spec delta. Refs #2433
The change 2205-refuse-code-loading-env-keys was still active on main. The archive creates the subprocess-environment spec. Refs #2433
…un code The refused keys add GCONV_PATH, SHELLOPTS, BASHOPTS and PS4. They also add DYLD_ and BASH_FUNC_ keys that no fixed list names, so a pattern that lists names fails the test. Refs #2433
…HOPTS or PS4 glibc iconv loads the gconv modules from the directories in GCONV_PATH. bash enables the options of SHELLOPTS and BASHOPTS at start, and with xtrace on it runs each command substitution in PS4. Thus each key makes a child run code that its caller did not choose. The comment of the constant names the source of each entry in short sentences. Refs #2433
…and off The bullet said that a child gets the environment without credentials, but isolate_env=False gives the full environment. It names CONST_CODE_LOADING_ENV_PATTERNS as the full list of refused keys, in place of "and more", and each sentence obeys the STE limits. Refs #2433
…nfig audit-keys The config-commands spec says that a compliant table shows the success line, and that the security alert names the leak. No test asserted either clause, so an edit that removed one passed the suite. Refs #2433
docs/TESTING.md puts an invariant test in tests/invariants/, one file per subject. The gh pin test, the .trivyignore test and the digest test of the base images now share tests/invariants/test_service_image.py. The flat file tests/test_service_image_gh.py is deleted. Refs #2433
…er another character The pin test kept only the bare tokens that start with the gh release URL. A quoted RUN curl of an older gh then passed it. The finder is now a function with its own test, which fails on the token rule. Refs #2433
The finder searches the text with one regular expression, so it sees a gh release URL that is bare, in quotes or after another character. A Dockerfile with a quoted curl of gh v2.102.0 now fails the pin test. Refs #2433
… name A pattern that keeps only the function name x passed every test. The test now refuses BASH_FUNC_git%%, the key that replaces git in a bash child, so that pattern fails.
…mes no tag The finder saw only releases/download/ URLs. A curl of releases/latest/download/, or a base URL that a later line completes, passed the pin test.
…gged downloads The finder matched only releases/download/ URLs, so a curl of releases/latest/download/ passed the pin test. It now returns each path after releases/, and the pin test needs exactly the amd64 and arm64 assets of one tag.
…ility of #2433 openspec/config.yaml keeps pull request numbers out of an artifact.
…nd ARCHITECTURE.md The comment of CONST_CODE_LOADING_ENV_PATTERNS and the child environment bullet said that the list holds every key that makes a child load or run code. The guard accepts PYTHONPATH, NODE_OPTIONS and ZDOTDIR, which run code (#2429). The comment now names the loader, gconv and bash families and their manual pages in 25 words. The bullet writes out the families and names the keys that the guard does not refuse.
Test resultsTargeted tests on the head after the rebase onto Fail-to-pass
The Readiness notes for a person
|
🤖 I have created a release *beep* *boop* --- ## [0.10.0](v0.9.0...v0.10.0) (2026-10-28) ### Features * **review:** devops review intake hands the findings of a session on merged code to roadmap intake ([#2455](#2455)) ([a5c7b82](a5c7b82)) * **security:** devops k8s audit runs Popeye in the tool sandbox with a kube-api network profile that only reads the API server ([#2467](#2467)) ([e02c3fb](e02c3fb)) * **security:** the App's installation tokens carry only the permissions the roadmap jobs use ([#2482](#2482)) ([9599ef2](9599ef2)), closes [#2473](#2473) ### Bug Fixes * **config:** a config file that is not valid YAML stops the load with an error that quotes none of its text ([#2468](#2468)) ([91fe5dc](91fe5dc)) * **config:** config set reports an unknown key as unknown, not as a key that needs a value ([#2465](#2465)) ([8b650a6](8b650a6)) * **devcontainer:** run the checkout's devops in devcontainer terminals ([#2460](#2460)) ([abd2d41](abd2d41)) * **k8s:** loki runs from the grafana-community chart on loki 3.7.9, out of reach of CVE-2026-21729 ([#2470](#2470)) ([96c50c9](96c50c9)) * **security:** a credential keyword at the end of a line no longer masks the first word of the next line ([#2461](#2461)) ([b754a73](b754a73)) * **security:** a credential value is masked also when the next line starts with a parenthesis ([#2477](#2477)) ([ece25ca](ece25ca)), closes [#2471](#2471) * **security:** pin kubeconform and replace Checkov with Trivy's misconfiguration scan ([#2464](#2464)) ([960e357](960e357)) * **security:** refuse GCONV_PATH, SHELLOPTS, BASHOPTS and PS4 from a caller, and archive the merged security changes ([#2453](#2453)) ([1f9231d](1f9231d)) ### Code Refactoring * **ai:** chat_structured is the one structured-output path ([#2452](#2452)) ([3509732](3509732)) * **github:** pr check-readiness reads one merge-readiness verdict from github/ ([#2456](#2456)) ([16442c4](16442c4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This change completes the security work of #1469, #1492 and #2205. A person merged their pull requests before their review and their OpenSpec archive ran, and the review then found the defects that this change removes.
1469-audit-keys-leak-exit-code,1492-drop-gh-go-trivy-ignoresand2205-refuse-code-loading-env-keysare archived, one commit each. Thusopenspec/specs/holds their requirements.build_subprocess_envrefuses a caller override ofGCONV_PATH,SHELLOPTS,BASHOPTSandPS4, in upper and lower case, with environment isolation on and off. It raises the sameSecurityErroras for the other refused keys. glibciconv_open(3)loads the gconv modules from the directories thatGCONV_PATHnames. bash enables the options ofSHELLOPTSandBASHOPTSat start. Withxtraceon, bash expandsPS4, command substitution included, before each command. Thus each of these keys can make a child run code that its caller did not choose.DYLD_orBASH_FUNC_, also a key that no fixed list names.CONST_CODE_LOADING_ENV_PATTERNSand the child environment bullet ofARCHITECTURE.mdname only the refused families. The bullet describesisolate_envon and off. It says that other keys that make a child run code, for examplePYTHONPATH,NODE_OPTIONSandZDOTDIR, still reach the child (fix(security): the subprocess environment guard refuses the zsh and interpreter keys that make a child run code #2429).tests/test_config_audit_keys.pyasserts the success line of a compliant audit, and the name of the leak in the security alert.tests/invariants/test_service_image.py, andtests/test_service_image_gh.pyis deleted. The gh pin test finds each gh release path in the Dockerfile text, also in quotes or after another character. It accepts only the two tagged downloads of one release.docs/TESTING.mdlists the new subject file.Closes #2433
Change:
openspec/changes/archive/2026-10-28-2433-finish-merged-security-fixes/