-
Notifications
You must be signed in to change notification settings - Fork 750
feat: share scan settings across the CLI and SDK #742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mldangelo-oai
wants to merge
16
commits into
main
Choose a base branch
from
mdangelo/codex/project-configuration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
40f4284
feat(cli): add YAML and JSON project configuration
mldangelo-oai b031e50
Merge main into project configuration branch
mldangelo-oai e934a27
refactor(cli): simplify project configuration and docs
mldangelo-oai 0ea8253
Merge main into project configuration branch
mldangelo-oai 0ea2464
fix(cli): repair configuration regressions and Windows tests
mldangelo-oai 1e33329
feat(sdk): share project configuration with the CLI
mldangelo-oai 3219d7f
fix(sdk): allow reruns after blank scan prompts
mldangelo-oai 52da4db
refactor(config): use snake_case project keys
mldangelo-oai d1a465e
fix(sdk): leave missing ambient deep config unchanged
mldangelo-oai 4633f70
Merge main into mdangelo/codex/project-configuration
mldangelo-oai 6eb26ae
fix(sdk): compare normalized ambient config paths
mldangelo-oai 99aec86
fix(config): preserve path aliases and repeated YAML profiles
mldangelo-oai c847acf
fix(config): address project configuration review feedback
mldangelo-oai ce18609
fix(config): finish bulk inputs and portable starter checks
mldangelo-oai ddfeb21
fix(config): preserve bulk prompt repository checks
mldangelo-oai eee6169
Merge main into project configuration branch
mldangelo-oai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "$schema": "./node_modules/@openai/codex-security/schemas/project-config.schema.json", | ||
| "scan": { | ||
| "mode": "standard", | ||
| "scope": { "paths": ["sdk/typescript/src"] } | ||
| }, | ||
| "codex": { | ||
| "model": "gpt-5.6-sol", | ||
| "model_reasoning_effort": "xhigh" | ||
| }, | ||
| "policy": { "fail_on_severity": "high" } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # yaml-language-server: $schema=./node_modules/@openai/codex-security/schemas/project-config.schema.json | ||
| # Schema path assumes this file is copied to the root of your project. | ||
| scan: | ||
| mode: standard | ||
| scope: | ||
| paths: [sdk/typescript/src] | ||
| codex: | ||
| model: gpt-5.6-sol | ||
| model_reasoning_effort: xhigh | ||
| policy: | ||
| fail_on_severity: high |
|
mldangelo-oai marked this conversation as resolved.
|
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "workers": 4, | ||
| "subagents": 3, | ||
| "stopAfterNoNew": 4, | ||
| "stopAfterConsecutiveErrors": 3, | ||
| "maxDiscoveryRuns": 40, | ||
| "maxTimeHours": 96 | ||
| } |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,211 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "type": "object", | ||
| "properties": { | ||
| "$schema": { | ||
| "description": "Editor schema URI or relative path. The CLI does not fetch or select a validator from this value.", | ||
| "type": "string", | ||
| "minLength": 1 | ||
| }, | ||
| "auth": { | ||
| "default": "auto", | ||
| "description": "Credential-source choice only; never a credential value.", | ||
| "type": "string", | ||
| "enum": ["auto", "chatgpt", "api-key"] | ||
| }, | ||
| "scan": { | ||
| "type": "object", | ||
| "properties": { | ||
| "mode": { | ||
| "default": "standard", | ||
| "type": "string", | ||
| "enum": ["standard", "deep"] | ||
| }, | ||
| "scope": { | ||
| "description": "One scope variant. Omit for the whole repository. Mode compatibility is checked after overrides.", | ||
| "anyOf": [ | ||
| { | ||
| "type": "object", | ||
| "properties": { | ||
| "paths": { | ||
| "minItems": 1, | ||
| "type": "array", | ||
| "items": { "type": "string", "minLength": 1 }, | ||
| "description": "Literal paths relative to the selected repository." | ||
| } | ||
| }, | ||
| "required": ["paths"], | ||
| "additionalProperties": false | ||
| }, | ||
| { | ||
| "type": "object", | ||
| "properties": { | ||
| "diff": { | ||
| "type": "object", | ||
| "properties": { | ||
| "base": { "type": "string", "minLength": 1 }, | ||
| "head": { | ||
| "default": "HEAD", | ||
| "type": "string", | ||
| "minLength": 1 | ||
| } | ||
| }, | ||
| "required": ["base"], | ||
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "required": ["diff"], | ||
| "additionalProperties": false | ||
| }, | ||
| { | ||
| "type": "object", | ||
| "properties": { | ||
| "working_tree": { | ||
| "type": "object", | ||
| "properties": { | ||
| "base": { | ||
| "default": "HEAD", | ||
| "type": "string", | ||
| "minLength": 1 | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "required": ["working_tree"], | ||
| "additionalProperties": false | ||
| } | ||
| ] | ||
| }, | ||
| "knowledge_base": { | ||
| "description": "Context files or directories, relative to this file. An empty list selects no additional context.", | ||
| "type": "array", | ||
| "items": { "type": "string", "minLength": 1 } | ||
| }, | ||
| "instructions_file": { | ||
| "description": "Additional scan instructions, relative to this file.", | ||
| "type": "string", | ||
| "minLength": 1 | ||
| }, | ||
| "validation_file": { | ||
| "description": "Custom validation instructions, relative to this file; not supported in active deep scans.", | ||
| "type": "string", | ||
| "minLength": 1 | ||
| }, | ||
| "deep": { | ||
| "description": "Deep defaults; a valid block may be retained while standard mode is selected.", | ||
| "type": "object", | ||
| "properties": { | ||
| "workers": { | ||
| "default": 4, | ||
| "description": "Maximum concurrent deep-scan discovery workers.", | ||
| "type": "integer", | ||
| "exclusiveMinimum": 0, | ||
| "maximum": 9007199254740991 | ||
| }, | ||
| "subagents_per_worker": { | ||
| "default": 3, | ||
| "description": "Subagents available to each deep-scan worker. Zero is valid.", | ||
| "type": "integer", | ||
| "minimum": 0, | ||
| "maximum": 9007199254740991 | ||
| }, | ||
| "stop_after_no_new": { | ||
| "default": 4, | ||
| "description": "Stop after this many runs find no new issues.", | ||
| "type": "integer", | ||
| "exclusiveMinimum": 0, | ||
| "maximum": 9007199254740991 | ||
| }, | ||
| "stop_after_consecutive_errors": { | ||
| "default": 3, | ||
| "description": "Stop after this many consecutive discovery errors.", | ||
| "type": "integer", | ||
| "exclusiveMinimum": 0, | ||
| "maximum": 9007199254740991 | ||
| }, | ||
| "max_discovery_runs": { | ||
| "default": 40, | ||
| "description": "Maximum deep-scan discovery runs.", | ||
| "type": "integer", | ||
| "exclusiveMinimum": 0, | ||
| "maximum": 9007199254740991 | ||
| }, | ||
| "max_time_hours": { | ||
| "default": 96, | ||
| "description": "Maximum deep-scan discovery hours (default: 96; maximum: 96).", | ||
| "type": "number", | ||
| "exclusiveMinimum": 0, | ||
| "maximum": 96 | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "codex": { | ||
| "description": "Native Codex overrides. Common key types are checked here; existing native and wrapper restrictions still apply.", | ||
| "type": "object", | ||
| "properties": { | ||
| "model": { "type": "string", "minLength": 1 }, | ||
| "model_reasoning_effort": { "type": "string", "minLength": 1 }, | ||
| "model_provider": { "type": "string", "minLength": 1 } | ||
| }, | ||
| "additionalProperties": { "$ref": "#/definitions/__schema0" } | ||
| }, | ||
| "limits": { | ||
| "type": "object", | ||
| "properties": { | ||
| "max_cost_usd_per_scan": { | ||
| "description": "Estimated USD limit per launched scan attempt, not a total batch budget. Omit for no limit.", | ||
| "type": "number", | ||
| "exclusiveMinimum": 0 | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "policy": { | ||
| "type": "object", | ||
| "properties": { | ||
| "fail_on_severity": { | ||
| "description": "Exit threshold; does not filter retained findings. Omit for report-only behavior.", | ||
| "type": "string", | ||
| "enum": ["critical", "high", "medium", "low"] | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "output": { | ||
| "type": "object", | ||
| "properties": { | ||
| "directory": { | ||
| "description": "Artifact directory relative to this file; existing outside-worktree checks still apply.", | ||
| "type": "string", | ||
| "minLength": 1 | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "additionalProperties": false, | ||
| "definitions": { | ||
| "__schema0": { | ||
| "anyOf": [ | ||
| { "type": "string" }, | ||
| { "type": "number" }, | ||
| { "type": "boolean" }, | ||
| { "type": "null" }, | ||
| { "type": "array", "items": { "$ref": "#/definitions/__schema0" } }, | ||
| { | ||
| "type": "object", | ||
| "propertyNames": { "type": "string" }, | ||
| "additionalProperties": { "$ref": "#/definitions/__schema0" } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "title": "Codex Security project configuration", | ||
| "description": "Input schema for explicitly selected YAML or JSON project files. Filesystem, active scan combinations, native configuration, and runtime availability are checked separately.", | ||
| "$comment": "Generated from ProjectConfigInputSchema. Defaults are annotations; apply defaults only after merging input layers." | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.