Repository navigation
Harden CODEOWNERS, action pins, CodeQL wording, and tool argv - #264
aien-spark wants to merge 8 commits into
Conversation
popen with an unquoted binary_path split on spaces and ran shell metacharacters. fork and exec keep the path as one argument, and the host test covers both. Co-authored-by: aien-spark <aien@aienos.com>
Move the proposed owners file to the path GitHub reads. The two aien-dev groups were not confirmed as teams with write access, so their lines are unchanged. Enforcement still waits on Drake's ruleset. Co-authored-by: aien-spark <aien@aienos.com>
checkout v7.0.1 is 3d3c42e5aac5ba805825da76410c181273ba90b1. upload-artifact v7 and v7.0.2 are cf430e030ddbb5b0abf93d22962f4752f3646cd9. Co-authored-by: aien-spark <aien@aienos.com>
The Actions list shows dynamic/github-code-scanning/codeql. There is no CodeQL workflow under .github/workflows. Co-authored-by: aien-spark <aien@aienos.com>
There was a problem hiding this comment.
Risk: medium. Approved: Cursor Security Agent completed with no findings that need human review, Cursor Bugbot was not running, and no approval policy requires extra review. The CODEOWNERS, action-pin, and argv changes stay within the medium-risk threshold.
Sent by Cursor Approval Agent: Pull Request Router and Approver
aien-spark
left a comment
There was a problem hiding this comment.
fix first. content is mostly right; the owners file and the receipt aren't.
blockers
- .github/CODEOWNERS:16-54 —
GET /repos/aien-dev/CUDApp/codeowners/errors?ref=388e228returns 30Unknown ownererrors: 24 for @aien-dev/gpu-core-reviewers (16-26, 28-29, 32-39, 42, 45-46), 6 for @aien-dev/ip-review (49-54). github drops them, so every path is effectively @drakestapleton-only. nothing goes ownerless, but docs/REVIEWING.md:3 calls this file activated and :22-23 requires a reviewer "in the owning group" that doesn't resolve. create the teams with write access, or take them out and say Drake is the owner until they exist. don't ship a file that has 30 errors. - receipt, docs/REVIEWING.md:12-13: no receipt path posted. the template also asks for a "new receipt path" (.github/PULL_REQUEST_TEMPLATE.md:7). the inline log is fine as content, and rev-parse = 388e228, but 1.3 asks for a path. commit it or post it.
not this pr, but red
- drift is failing for every pr opened after omega-mv f9a9a40b (#995 train r4, merged 00:28Z). the same paths drift against current main 183fa4f (Makefile, blackwell_codegen*, gpu_q38_graph*, omega_numeric., bw_warp_sim, a few tests). omega_blackwell_submit.c is still on its baseline blob 5efba9c in omega, so this edit isn't the cause. main goes red on its next drift run until r4 is ported.
- the branch is 37 behind main. rebase before merge.
checked, ok
- argv change: same tools and args, same scan, same fail-open on a missing tool or non-zero exit (status was ignored before and still is), stderr → /dev/null, execvp PATH lookup = sh lookup, EINTR waitpid. it's stricter on spaced and metachar paths, and there's no 512-byte truncation. the test separates old from new (split path,
;,$(), nm printf injection) and it's in HOST_TESTS. 73 targets checks out without CUDAPP_OMC_HOST. - pins: checkout 3d3c42e5 = v7.0.1, upload-artifact cf430e03 = v7.0.2 (= v7). all 4 pinned SHAs in .github/workflows are on their action's main (checkout and sbom-action behind main; download- and upload-artifact identical). no tag-pinned
uses:left anywhere. - codeql: AGENTS.md:78 matches. the workflow is dynamic/github-code-scanning/codeql and there's no codeql file or codeql-action use in .github/workflows.
- GB10 NOT RUN is fine. no hardware claim, and REVIEWING.md:50-51 doesn't require one.
- CODEOWNERS order is fine (last match wins,
*first). it covers itself via /.github/ (:59).
nits
- .github/CODEOWNERS:58
/docs/review/is dead; that dir is gone at head. - src/omega_blackwell_submit.c:703
pipe()without O_CLOEXEC. use pipe2(O_CLOEXEC) like glibc popen so concurrent forks don't inherit the fd. - src/omega_blackwell_submit.c:739,766 the NULL default
/proc/self/exeis resolved inside ldd/nm, so it audits the tool, not the caller (callers at :64-65, :203-204, :459-460). same before this pr, but the gate is meaningless on that path. - tests/zero_cuda_tool_argv_test.c:144 leaves /tmp/cudapp-argv-* behind.
- c3.yml:18, c4-streams.yml:15, c5-sharing.yml:17: no
persist-credentials: false, unlike every other workflow. nothing uploads .git, so this is low risk. - ampere-x86.yml:17,27,59 pinned with no version comment.
enforcement: ruleset 25770321 only blocks deletion and force-push, and classic protection is off. nothing here is enforced until Drake changes the ruleset. this review is from the author account, so it isn't the 1.4 non-author approval. cursor[bot]'s approval isn't the human owner review from section 2.
GitHub reported the two aien-dev team handles as unknown owners, so every listed path stays with @drakestapleton until those teams exist and have write access. The pipe uses O_CLOEXEC, the argv test removes its temp directory, and the C3, C4, and C5 checkouts do not persist credentials. Co-authored-by: aien-spark <aien@aienos.com>
The suite ran on that commit. This file was added afterwards and is not an input to make. GB10 stays NOT RUN. Co-authored-by: aien-spark <aien@aienos.com>
CodeQL reported fopen creating mode 0666, a chmod race on the copied stub, and the stub opening ZERO_CUDA_ARGV_LOG straight from the environment. New files are opened at 0600 or 0700, and the log path goes through omega_path_copy first. Co-authored-by: aien-spark <aien@aienos.com>


Purpose and scope
Security hardening from the 2026-11-01 read-only baseline. Drake approved this work. It does not touch the AGPL relicense, and it does not touch the drift workflow.
.github/CODEOWNERSis the file GitHub reads. The two unknown team handles are gone.@drakestapletonis the only owner on every listed path. The GPU-core and IP-review teams can be re-added once they exist and have write access.actions/checkoutandactions/upload-artifactinc3.yml,c4-streams.yml, andc5-sharing.ymlare pinned to full commit SHAs. Those checkouts setpersist-credentials: false.AGENTS.mdsays CodeQL is repository code scanning default setup (dynamic/github-code-scanning/codeql), not a workflow file in this tree.lddandnmchecks passbinary_pathwithfork/execand an argv. The pipe is created withpipe2(..., O_CLOEXEC).openat mode 0600 or 0700. The stub log path fromZERO_CUDA_ARGV_LOGgoes throughomega_path_copybefore it is opened. That is the fix for the six high CodeQL alerts on2e64052.The CODEOWNERS activation is meant to pair with an admin ruleset change (require 1 approval plus code-owner review). Drake will make that ruleset change himself. This PR does not change repository settings or rulesets.
Owners check
GET /repos/aien-dev/CUDApp/codeowners/errors?ref=2e6405285aa8e706157adfe09d72a05a3539fff0returned zero errors.af7e2eadoes not changeCODEOWNERS.@drakestapletonis GitHub user 213298340 and has admin on this repo.@aien-dev/gpu-core-reviewersand@aien-dev/ip-reviewwere removed. Creating those teams is an admin change and was not done here.Action pins
actions/checkouttagv7.0.1is commit3d3c42e5aac5ba805825da76410c181273ba90b1.actions/upload-artifacttagsv7andv7.0.2are both commitcf430e030ddbb5b0abf93d22962f4752f3646cd9.Evidence
Receipt path:
evidence/SEC-HARDENING-20261102/README.md.Fresh clone of
b198cdf18a0787f74049aceaac01f25c6891a3f8. Head2e64052added only that receipt. Headaf7e2ea902a89762a2dd6dc6104ad71f94e63390changes the argv test's file creation.test-zero-cuda-tool-argvwas re-run on that tree and printedtest-zero-cuda-tool-argv: PASS, includingPASS tmpdir removed. The fullmake testsuite was not re-run foraf7e2ea. The receipt file was not edited.CUDAPP_MEM_RESERVE_MIB=0for the fresh-clone run. MemTotal was 16387280 kB and MemAvailable was 5059312 kB. The source default stays 4096.make -j4 testonb198cdf: PASS. Exit 0. Last lineCUDA++ HOST TESTS PASS (73 targets).make test-native-artifactonb198cdf: PASS. Exit 0.test_gpu_artifact_export: 47 checks, 0 failed.make zero-cuda-gateonb198cdf: PASS. Exit 0.build/hello_gpu --simonb198cdf: PASS. Exit 0.make doctoronb198cdf: PASS as the expected NOT READY result. Make exited 2.python3 tools/figures/make_figures.py --checkonb198cdf: PASS. Exit 0.figures current: 10.make test-zero-cuda-tool-argvonaf7e2ea: PASS.make testonaf7e2ea: NOT RUN locally. CIhost-testscovers it.Known pre-existing item
omega_blackwell_verify_zero_libcuda_linkageandomega_blackwell_verify_zero_cuda_symbolsstill default a NULL path to/proc/self/exe. Afterexec, that path is thelddornmprocess, not the caller. This PR does not change that default.CI note
On
2e64052, CodeQL reported six high alerts in the new test files (world-writablefopen, achmodrace, and the env path).af7e2eais the fix. Drift failed on2e64052for the reason already recorded in review 5731101114: it is the omega-mv r4 drift, not this edit. The drift workflow was not changed.native-x86-hostwas cancelled, not a failing test.Sweep re-check (2026-11-04, DRA-130)
CI: only drift fails (https://github.com/aien-dev/CUDApp/actions/runs/41910535452/job/126856588983). GB10: NOT_RUN (not required for this change).
The drift FAIL (45 of ~920 GPU paths vs omega-mv d3d1b1bc7) is inherited from main. It clears when #266 merges.