Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
732f9ff
fix: make standard scan inventory authoritative
mldangelo-oai Jul 29, 2026
5b3db53
test: verify scan inventories across Windows line endings
mldangelo-oai Jul 29, 2026
214d5f8
Merge remote-tracking branch 'refs/remotes/origin/main' into mdangelo…
mldangelo-oai Jul 29, 2026
b829040
fix: close authoritative scan inventory gaps
mldangelo-oai Jul 29, 2026
d9a0da5
fix: isolate authoritative inventory outside writable scan roots
mldangelo-oai Jul 29, 2026
c621811
fix: enforce authoritative standard scan coverage
mldangelo-oai Jul 29, 2026
cd7617c
Merge remote-tracking branch 'origin/main' into mdangelo/codex/author…
mldangelo-oai Jul 29, 2026
42144a4
test: keep authoritative inventory regressions portable
mldangelo-oai Jul 29, 2026
ce7a58d
fix: complete authoritative scan verification
mldangelo-oai Jul 29, 2026
79a7125
fix: preserve bounded review and diff target contracts
mldangelo-oai Jul 29, 2026
205c9b0
fix: seal authoritative scan verifier and candidate payloads
mldangelo-oai Jul 29, 2026
2eebe71
fix: reverify finalized authoritative scan coverage
mldangelo-oai Jul 29, 2026
03fab82
fix: preserve honest deferred inventory coverage
mldangelo-oai Jul 29, 2026
8d9af3e
fix: seal complete standard scan provenance
mldangelo-oai Jul 29, 2026
fd5c83c
fix: protect scan verifier interpreter and proof gaps
mldangelo-oai Jul 29, 2026
b652bad
Merge remote-tracking branch 'origin/main' into mdangelo/codex/author…
mldangelo-oai Jul 29, 2026
2ed6ba3
fix: verify every standard scan completion
mldangelo-oai Jul 29, 2026
cb7af16
fix: reject writable Python verifier aliases
mldangelo-oai Jul 29, 2026
47b93db
fix: seal complete standard scan provenance
mldangelo-oai Jul 29, 2026
e93ca1d
fix: reconcile native scan paths and deferred coverage
mldangelo-oai Jul 29, 2026
2a2ceca
fix: bind standard scan exclusions to coverage
mldangelo-oai Jul 29, 2026
05a19bb
merge: reconcile authoritative scan inventory with main
mldangelo-oai Jul 29, 2026
c7260fb
fix: preserve overlapping scan scope coverage
mldangelo-oai Jul 30, 2026
f08e44a
fix: persist authoritative standard scan exclusions
mldangelo-oai Jul 30, 2026
7c5ea70
merge: preserve latest Node and npm release safeguards
mldangelo-oai Jul 30, 2026
6ae935e
merge: preserve the current 0.1.4 security release
mldangelo-oai Jul 30, 2026
24035bf
fix: attest standard scan exclusions and bound source reads
mldangelo-oai Jul 30, 2026
1414ce0
Merge commit '630810bacbb88729204a87b80dd8ae3a7f10d187' into mdangelo…
mldangelo-oai Jul 30, 2026
7a0ed70
test: cover complete registered inventory exclusions
mldangelo-oai Jul 30, 2026
6657295
test: accept Windows inventory line endings
mldangelo-oai Jul 30, 2026
def1450
Merge remote-tracking branch 'origin/main' into mdangelo/codex/author…
mldangelo-oai Jul 30, 2026
8dd1f65
fix: attest standard scan exclusions and bounded inventories
mldangelo-oai Jul 30, 2026
64efc3e
test: terminate synthetic login process after emitting its result
mldangelo-oai Jul 30, 2026
8ddff07
fix: authenticate complete registered scan exclusions
mldangelo-oai Jul 30, 2026
73500c1
fix: verify authoritative coverage before app scan completion
mldangelo-oai Jul 30, 2026
fcdd06c
test: synchronously flush synthetic ChatGPT login prompts
mldangelo-oai Jul 30, 2026
843a10f
fix: attest standard scan scope and recovered inventory
mldangelo-oai Jul 30, 2026
5cbcab3
refactor: deduplicate secure scope inventory handling
mldangelo-oai Aug 3, 2026
ba19295
fix: merge main and harden authoritative inventory migration
mldangelo-oai Aug 3, 2026
4871ee5
fix: harden authoritative standard-scan inventory
mldangelo-oai Aug 4, 2026
c29c4e0
fix: attest inventory contents and captured exclusions
mldangelo-oai Aug 4, 2026
da61f24
fix: bound inventory verification and escape scope exclusions
mldangelo-oai Aug 4, 2026
5bb74bb
fix: bound inventory hashing and reject special files
mldangelo-oai Aug 4, 2026
a75d1e2
Merge main and simplify scoped source inventory hardening
mldangelo-oai Aug 10, 2026
f59102b
Reject symlink scopes before processing parent traversal
mldangelo-oai Aug 10, 2026
925d77e
Keep tracked scoped files and reject Windows junctions
mldangelo-oai Aug 10, 2026
8a46f8a
fix(scan): exclude dependencies and binaries from broad scopes
mldangelo-oai Aug 10, 2026
d4e9cad
Preserve complete scoped inventories while rejecting redirecting links
mldangelo-oai Aug 10, 2026
bda942b
Reject every redirecting Windows reparse point
mldangelo-oai Aug 10, 2026
d11fd04
Merge branch 'main' into mdangelo/codex/authoritative-scan-inventory
mldangelo-oai Aug 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions sdk/typescript/_bundled_plugin/scripts/generate_rank_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,36 @@ def path_is_excluded(path: Path) -> bool:
return path.name.endswith((".min.js", ".map"))


def resolve_scope(repo: Path, scope: str, *, expand_user: bool = True) -> Path:
def resolve_scope(
repo: Path,
scope: str,
*,
expand_user: bool = True,
reject_symlinks: bool = False,
) -> Path:
scope_path = Path(scope).expanduser() if expand_user else Path(scope)
if not scope_path.is_absolute():
scope_path = repo / scope_path
if reject_symlinks:
repository = repo.resolve()
try:
relative = scope_path.relative_to(repository)
except ValueError as exc:
raise SystemExit(f"Scope must be inside repo: {scope_path}") from exc
ancestor = repository
for part in relative.parts:
if part == "..":
if ancestor == repository:
raise SystemExit(f"Scope must be inside repo: {scope_path}")
ancestor = ancestor.parent
continue
ancestor /= part
try:
metadata = ancestor.stat(follow_symlinks=False)
except OSError as exc:
raise SystemExit(f"Scope path not found: {ancestor}") from exc
if ancestor.is_symlink() or getattr(metadata, "st_reparse_tag", 0) & 0x20000000:
raise SystemExit(f"Requested scope must not contain symbolic links: {ancestor}")
scope_path = scope_path.resolve()
repo_resolved = repo.resolve()
try:
Expand Down Expand Up @@ -481,7 +507,7 @@ def make_repo_scope_input(args: argparse.Namespace) -> None:
scopes = load_scopes_file(Path(args.scopes_file).expanduser())
rows_by_path: dict[str, JsonRow] = {}
for scope in scopes:
scope_path = resolve_scope(repo, scope, expand_user=False)
scope_path = resolve_scope(repo, scope, expand_user=False, reject_symlinks=True)
Comment thread
mldangelo-oai marked this conversation as resolved.
if scope_path.is_file():
candidates = (scope_path,)
else:
Expand Down
43 changes: 42 additions & 1 deletion sdk/typescript/tests-ts/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4106,6 +4106,7 @@ describe("CodexSecurity orchestration", () => {
const repository = join(root, "repository");
const source = join(repository, "src");
const ignored = join(source, "node_modules");
const vendored = join(source, "vendor");
const scopes = join(root, "scopes.json");
const output = join(root, "scoped-source-input.jsonl");
const interpreter =
Expand All @@ -4115,16 +4116,30 @@ describe("CodexSecurity orchestration", () => {
await mkdir(join(source, "tests"), { recursive: true });
await mkdir(join(source, "examples"));
await mkdir(ignored);
await mkdir(vendored);
execFileSync("git", ["init", "-q"], { cwd: repository });
await Promise.all([
writeFile(join(repository, ".gitignore"), "node_modules/\n.env\n"),
writeFile(
join(repository, ".gitignore"),
"node_modules/\n.env\nvendor/\n",
),
writeFile(join(source, "handler.ts"), "export {};\n"),
writeFile(join(source, "Dockerfile"), "FROM scratch\n"),
writeFile(join(source, "tests", "handler.test.ts"), "export {};\n"),
writeFile(join(source, "examples", "demo.ts"), "export {};\n"),
writeFile(join(source, ".env"), "SECRET=private\n"),
writeFile(
join(source, "logo.png"),
Buffer.from([0x89, 0x50, 0x4e, 0x47]),
),
writeFile(join(ignored, "dependency.ts"), "export {};\n"),
writeFile(join(vendored, "dependency.ts"), "export {};\n"),
]);
execFileSync(
"git",
["add", "--force", "src/vendor/dependency.ts", "src/logo.png"],
{ cwd: repository },
);

const enumerate = async (requested: string[]) => {
await writeFile(scopes, JSON.stringify(requested));
Expand Down Expand Up @@ -4153,16 +4168,42 @@ describe("CodexSecurity orchestration", () => {
"src/Dockerfile",
"src/examples/demo.ts",
"src/handler.ts",
"src/logo.png",
"src/tests/handler.test.ts",
"src/vendor/dependency.ts",
]);
expect(await enumerate(["src", "src/.env"])).toEqual([
"src/.env",
"src/Dockerfile",
"src/examples/demo.ts",
"src/handler.ts",
"src/logo.png",
"src/tests/handler.test.ts",
"src/vendor/dependency.ts",
]);
expect(await enumerate(["src/vendor", "src/logo.png"])).toEqual([
"src/logo.png",
"src/vendor/dependency.ts",
]);
await expect(enumerate(["../scopes.json"])).rejects.toThrow();
if (process.platform !== "win32") {
await symlink(join(source, "handler.ts"), join(source, "alias.ts"));
await symlink(source, join(repository, "alias"));
await expect(enumerate(["src/alias.ts"])).rejects.toThrow(
/symbolic links/,
);
await expect(enumerate(["alias/handler.ts"])).rejects.toThrow(
/symbolic links/,
);
await expect(enumerate(["alias/../src/handler.ts"])).rejects.toThrow(
/symbolic links/,
);
} else {
await symlink(source, join(repository, "junction"), "junction");
await expect(enumerate(["junction/handler.ts"])).rejects.toThrow(
/symbolic links/,
);
}
});

test("removes scoped target files after a scan settles", async () => {
Expand Down
Loading