OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security
TypeScript ai-securityapplication-securityclicode-scanningcodexcodex-securitycybersecuritydevsecopsnodejsnpmopenaisdksecuritytypescriptvulnerability-scanning
fix(ci): run consistent checks for Markdown changes (#1257)
mldangelo-oai2c70250b3192
diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.ymlindex 3f41e68ef..a581b8a68 100644--- a/.github/workflows/node-ci.yml+++ b/.github/workflows/node-ci.yml@@ -19,7 +19,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 10outputs:- ci-mode: ${{ steps.scope.outputs.ci-mode }}container-validate: ${{ steps.scope.outputs.container-validate }}test-quality: ${{ steps.scope.outputs.test-quality }}workflow-quality: ${{ steps.scope.outputs.workflow-quality }}@@ -32,7 +31,7 @@ jobs:fetch-depth: 2persist-credentials: false- - name: Decide CI mode+ - name: Select additional checksid: scopeshell: bashenv:@@ -40,8 +39,6 @@ jobs:BASE_CHANGED: ${{ github.event.changes.base != null }}run: |set -euo pipefail- ci_mode=full- check_markdown=falsecontainer_validate=falseif [[ "$EVENT_NAME" == "push" ]]; thencontainer_validate=true@@ -61,18 +58,7 @@ jobs:trap 'rm -f "$changed_files"' EXITgit diff --no-renames --name-only -z HEAD^1 HEAD > "$changed_files"- changed=false- markdown_only=true- plugin_changed=falsewhile IFS= read -r -d '' path; do- changed=true- if [[ "$path" != *.md ]]; then- markdown_only=false- fi- if [[ "$path" == plugins/codex-security/* ||- "$path" == sdk/typescript/_bundled_plugin/* ]]; then- plugin_changed=true- ficase "$path" in.github/workflows/* | .github/actions/* | .github/actionlint.yaml | .github/zizmor.yml | \docker/verify-container-compose.sh)@@ -98,15 +84,7 @@ jobs:;;esacdone < "$changed_files"- if [[ "$changed" == "true" && "$markdown_only" == "true" ]]; then- check_markdown=true- if [[ "$plugin_changed" == "false" ]]; then- ci_mode=markdown- fi- fifi- printf 'ci-mode=%s\n' "$ci_mode" >> "$GITHUB_OUTPUT"- printf 'check-markdown=%s\n' "$check_markdown" >> "$GITHUB_OUTPUT"printf 'container-validate=%s\n' "$container_validate" >> "$GITHUB_OUTPUT"printf 'test-quality=%s\n' "$test_quality" >> "$GITHUB_OUTPUT"printf 'workflow-quality=%s\n' "$workflow_quality" >> "$GITHUB_OUTPUT"@@ -125,38 +103,6 @@ jobs:exit 1fi- - name: Set up TypeScript tools- if: steps.scope.outputs.check-markdown == 'true'- uses: ./.github/actions/setup-tools-- - name: Install dependencies- if: steps.scope.outputs.check-markdown == 'true'- run: pnpm --dir sdk/typescript install --frozen-lockfile-- - name: Compile CI scripts- if: steps.scope.outputs.ci-mode == 'markdown'- run: pnpm --dir sdk/typescript run build:ci-- - name: Check plugin source compatibility- if: steps.scope.outputs.ci-mode == 'markdown'- run: |- node .github/scripts/check_plugin_source_compatibility.mjs-- - name: Check Markdown formatting- if: steps.scope.outputs.check-markdown == 'true'- shell: bash- run: |- files=()- while IFS= read -r -d '' path; do- if [[ -f "$GITHUB_WORKSPACE/$path" &&- ! -L "$GITHUB_WORKSPACE/$path" ]]; then- files+=("$GITHUB_WORKSPACE/$path")- fi- done < <(git diff --no-renames --name-only -z HEAD^1 HEAD)- if ((${#files[@]} > 0)); then- pnpm --dir sdk/typescript exec prettier --check "${files[@]}"- fi-workflow-quality:needs: validate-titleif: needs.validate-title.outputs.workflow-quality == 'true'@@ -165,7 +111,6 @@ jobs:static-checks:name: typecheck and formattingneeds: validate-title- if: needs.validate-title.outputs.ci-mode == 'full'runs-on: ubuntu-latesttimeout-minutes: 20steps:@@ -193,7 +138,6 @@ jobs:native:needs: validate-title- if: needs.validate-title.outputs.ci-mode == 'full' || needs.validate-title.outputs.container-validate == 'true' || needs.validate-title.outputs.test-quality == 'true'uses: ./.github/workflows/native-artifacts.ymlcontainer-validate:@@ -211,7 +155,6 @@ jobs:package:name: build and check packageneeds: [validate-title, native]- if: needs.validate-title.outputs.ci-mode == 'full'runs-on: ubuntu-latesttimeout-minutes: 20steps:@@ -253,7 +196,6 @@ jobs:test:name: tests / ${{ matrix.os }} / shard-${{ matrix.shard }}needs: [validate-title, package]- if: needs.validate-title.outputs.ci-mode == 'full'runs-on: ${{ matrix.os }}timeout-minutes: 20strategy:@@ -319,7 +261,6 @@ jobs:compatibility:name: installed package / ${{ matrix.os }} / node-${{ matrix.node }}needs: [validate-title, package]- if: needs.validate-title.outputs.ci-mode == 'full'runs-on: ${{ matrix.os }}timeout-minutes: 20strategy:@@ -353,7 +294,6 @@ jobs:mcp:name: MCP app testsneeds: [validate-title, package]- if: needs.validate-title.outputs.ci-mode == 'full'runs-on: ubuntu-latesttimeout-minutes: 20steps:@@ -394,7 +334,6 @@ jobs:plugin-host:name: standalone plugin / ${{ matrix.os }}needs: validate-title- if: needs.validate-title.outputs.ci-mode == 'full'runs-on: ${{ matrix.os }}timeout-minutes: 20strategy:@@ -421,7 +360,6 @@ jobs:plugin-source:name: plugin source contracts / ${{ matrix.os }} / python-${{ matrix.python }}needs: validate-title- if: needs.validate-title.outputs.ci-mode == 'full'runs-on: ${{ matrix.os }}timeout-minutes: 30strategy:@@ -542,7 +480,7 @@ jobs:if: needs.validate-title.outputs.workflow-quality == 'true' && needs.workflow-quality.result != 'success'run: exit 1- name: Require every Unix coverage job- if: needs.validate-title.result != 'success' || (needs.validate-title.outputs.ci-mode == 'full' && (needs.static-checks.result != 'success' || needs.package.result != 'success' || needs.test.result != 'success' || needs.compatibility.result != 'success' || needs.mcp.result != 'success' || needs.plugin-host.result != 'success' || needs.plugin-source.result != 'success')) || (needs.validate-title.outputs.ci-mode != 'full' && needs.validate-title.outputs.ci-mode != 'markdown')+ if: needs.validate-title.result != 'success' || (needs.static-checks.result != 'success' || needs.package.result != 'success' || needs.test.result != 'success' || needs.compatibility.result != 'success' || needs.mcp.result != 'success' || needs.plugin-host.result != 'success' || needs.plugin-source.result != 'success')run: exit 1- name: Require selected container coverageif: needs.validate-title.outputs.container-validate == 'true' && needs.container-validate.result != 'success'@@ -551,7 +489,6 @@ jobs:windows-test:name: windows-latest / node-22 / tests-${{ matrix.shard }}needs: [validate-title, package]- if: needs.validate-title.outputs.ci-mode == 'full'runs-on: windows-latesttimeout-minutes: 20strategy:@@ -628,7 +565,6 @@ jobs:windows-verify:name: windows-latest / node-${{ matrix.node == '22.13.0' && '22' || matrix.node }} / verifyneeds: [validate-title, package]- if: needs.validate-title.outputs.ci-mode == 'full'runs-on: windows-latesttimeout-minutes: 20strategy:@@ -679,5 +615,5 @@ jobs:node: ["22.13.0", "24"]steps:- name: Require every Windows coverage job- if: needs.validate-title.result != 'success' || (needs.validate-title.outputs.ci-mode == 'full' && (needs.static-checks.result != 'success' || needs.plugin-host.result != 'success' || needs.plugin-source.result != 'success' || needs.windows-test.result != 'success' || needs.windows-verify.result != 'success')) || (needs.validate-title.outputs.ci-mode != 'full' && needs.validate-title.outputs.ci-mode != 'markdown')+ if: needs.validate-title.result != 'success' || (needs.static-checks.result != 'success' || needs.plugin-host.result != 'success' || needs.plugin-source.result != 'success' || needs.windows-test.result != 'success' || needs.windows-verify.result != 'success')run: exit 1diff --git a/evals/triage-finding/sastbench/DESIGN.md b/evals/triage-finding/sastbench/DESIGN.mdindex 6d1ec0cb2..87b40b4f8 100644--- a/evals/triage-finding/sastbench/DESIGN.md+++ b/evals/triage-finding/sastbench/DESIGN.md@@ -28,11 +28,11 @@ The Codex provider runs from a throwaway directory containing only the runtime s## Verdict mapping-| Triage verdict | SastBench interpretation |-| --- | --- |-| `confirmed` | predicts true positive |-| `not_actionable` | predicts false positive |-| `needs_review` | abstains |+| Triage verdict | SastBench interpretation |+| ---------------- | ------------------------ |+| `confirmed` | predicts true positive |+| `not_actionable` | predicts false positive |+| `needs_review` | abstains |Strict metrics count an abstention as incorrect for that row. Decided-only metrics exclude abstentions and report coverage. Workflow metrics separately measure true-positive retention, unsafe closure, false-alert auto-closure, false-alert escalation, confirmed precision, abstention, and remaining analyst workload. Model errors and invalid output remain unresolved work.diff --git a/evals/triage-finding/sastbench/README.md b/evals/triage-finding/sastbench/README.mdindex 31c964fbd..6519a9f38 100644--- a/evals/triage-finding/sastbench/README.md+++ b/evals/triage-finding/sastbench/README.md@@ -74,10 +74,10 @@ Promptfoo computes the SastBench confusion matrix, strict and decided-only metriSastBench's `false_positive` label is the benchmark's negative class: it means the supplied scanner alert is expected to be benign. The eval maps `triage-finding` verdicts to SastBench predictions as follows:-| SastBench ground truth | `confirmed` | `not_actionable` | `needs_review` | Execution or parse error |-| --- | --- | --- | --- | --- |-| `true_positive` | True positive | False negative | Strict false negative; excluded from decided-only metrics | Strict false negative; excluded from decided-only metrics |-| `false_positive` | False positive | True negative | Strict false positive; excluded from decided-only metrics | Strict false positive; excluded from decided-only metrics |+| SastBench ground truth | `confirmed` | `not_actionable` | `needs_review` | Execution or parse error |+| ---------------------- | -------------- | ---------------- | --------------------------------------------------------- | --------------------------------------------------------- |+| `true_positive` | True positive | False negative | Strict false negative; excluded from decided-only metrics | Strict false negative; excluded from decided-only metrics |+| `false_positive` | False positive | True negative | Strict false positive; excluded from decided-only metrics | Strict false positive; excluded from decided-only metrics |Strict metrics count every benchmark row. They count `needs_review` and execution or parse errors as incorrect. Decided-only metrics include only valid `confirmed` and `not_actionable` verdicts.@@ -101,29 +101,29 @@ The `Group` column uses these categories:Every denominator uses `max(denominator, 1)`. An empty denominator therefore produces `0` instead of `NaN`.-| Group | Metric | Exact definition | Interpretation |-| --- | --- | --- | --- |-| Strict | `strict_precision` | `TPs / max(TPs + FPs, 1)` | Of the cases treated as positive by strict scoring, the fraction that are genuine positives. Negative abstentions and errors count as strict false positives. |-| Strict | `strict_recall` | `TPs / max(TPs + FNs, 1)` | Fraction of all genuine alerts explicitly marked `confirmed`. `not_actionable`, `needs_review`, and errors on positive cases reduce strict recall. |-| Strict | `strict_f1` | `2 * TPs / max(2 * TPs + FPs + FNs, 1)` | Harmonic balance between strict precision and strict recall with equal weight. |-| Strict | `strict_f2` | `5 * TPs / max(5 * TPs + FPs + 4 * FNs, 1)` | Precision-recall balance weighted toward recall, so missing a genuine alert matters more than retaining a false alert. |-| Strict | `strict_accuracy` | `(TPs + TNs) / max(W, 1)` | Fraction of the represented population assigned the exact correct decisive verdict. Abstentions and errors are incorrect. |-| Strict | `strict_mcc` | `(TPs * TNs - FPs * FNs) / max(sqrt((TPs + FPs) * (TPs + FNs) * (TNs + FPs) * (TNs + FNs)), 1)` | Matthews correlation coefficient across all rows. It balances both classes in the imbalanced SastBench dataset. The usual range is `-1` to `1`; a degenerate confusion matrix returns `0` through the denominator guard. |-| Decided only | `decided_precision` | `TPd / max(TPd + FPd, 1)` | Among valid `confirmed` decisions, the fraction that are genuine positives. Abstentions and errors are excluded. |-| Decided only | `decided_recall` | `TPd / max(TPd + FNd, 1)` | Among genuine-positive cases with a decisive verdict, the fraction marked `confirmed`. This is not overall recall because positive abstentions and errors are excluded. |-| Decided only | `decided_f1` | `2 * TPd / max(2 * TPd + FPd + FNd, 1)` | Equal-weight precision-recall balance over decisive verdicts only. |-| Decided only | `decided_f2` | `5 * TPd / max(5 * TPd + FPd + 4 * FNd, 1)` | Recall-weighted precision-recall balance over decisive verdicts only. |-| Decided only | `decided_accuracy` | `(TPd + TNd) / max(D, 1)` | Fraction of valid non-abstaining decisions that are correct. |-| Decided only | `decided_mcc` | `(TPd * TNd - FPd * FNd) / max(sqrt((TPd + FPd) * (TPd + FNd) * (TNd + FPd) * (TNd + FNd)), 1)` | Matthews correlation coefficient after excluding abstentions and errors. Read it together with `decided_coverage`. |-| Decided only | `decided_coverage` | `D / max(W, 1)` | Fraction of the represented population receiving a valid `confirmed` or `not_actionable` verdict. Low coverage can make decided-only quality look artificially strong. |-| Workflow | `true_positive_retention` | `(positive cases marked confirmed or needs_review) / max(P, 1)` | Fraction of genuine alerts not automatically closed. `needs_review` counts as retained; an execution or parse error does not. |-| Workflow | `unsafe_closure_rate` | `(positive cases marked not_actionable) / max(P, 1)` | Fraction of genuine alerts the skill would incorrectly auto-close. |-| Workflow | `false_alert_auto_closure_rate` | `(negative cases marked not_actionable) / max(N, 1)` | Fraction of actual false alerts removed without human review. |-| Workflow | `false_alert_escalation_rate` | `(negative cases marked needs_review) / max(N, 1)` | Fraction of false alerts sent to a human instead of being auto-closed. Negative cases incorrectly confirmed or ending in errors are outside this numerator. |-| Workflow | `confirmed_precision` | `(positive cases marked confirmed) / max(all confirmed cases, 1)` | Among alerts placed in the confirmed queue, the fraction that are genuine. Under the current verdict mapping, this is numerically equal to `decided_precision`. |-| Workflow | `abstention_rate` | `(valid needs_review verdicts) / max(W, 1)` | Fraction of the represented population where the skill explicitly declines to decide. Execution and parsing errors are not abstentions. |-| Workflow | `remaining_analyst_workload` | `(confirmed + needs_review + execution or parse errors) / max(W, 1)` | Fraction of the represented alert queue still requiring human handling. Only a valid `not_actionable` verdict removes an alert from this workload, even when that closure is unsafe. |-| Reliability | `execution_or_parse_error_rate` | `(model errors + invalid outputs) / max(W, 1)` | Fraction of the represented population without a usable triage verdict because execution failed or the output could not be parsed as the required contract. |+| Group | Metric | Exact definition | Interpretation |+| ------------ | ------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| Strict | `strict_precision` | `TPs / max(TPs + FPs, 1)` | Of the cases treated as positive by strict scoring, the fraction that are genuine positives. Negative abstentions and errors count as strict false positives. |+| Strict | `strict_recall` | `TPs / max(TPs + FNs, 1)` | Fraction of all genuine alerts explicitly marked `confirmed`. `not_actionable`, `needs_review`, and errors on positive cases reduce strict recall. |+| Strict | `strict_f1` | `2 * TPs / max(2 * TPs + FPs + FNs, 1)` | Harmonic balance between strict precision and strict recall with equal weight. |+| Strict | `strict_f2` | `5 * TPs / max(5 * TPs + FPs + 4 * FNs, 1)` | Precision-recall balance weighted toward recall, so missing a genuine alert matters more than retaining a false alert. |+| Strict | `strict_accuracy` | `(TPs + TNs) / max(W, 1)` | Fraction of the represented population assigned the exact correct decisive verdict. Abstentions and errors are incorrect. |+| Strict | `strict_mcc` | `(TPs * TNs - FPs * FNs) / max(sqrt((TPs + FPs) * (TPs + FNs) * (TNs + FPs) * (TNs + FNs)), 1)` | Matthews correlation coefficient across all rows. It balances both classes in the imbalanced SastBench dataset. The usual range is `-1` to `1`; a degenerate confusion matrix returns `0` through the denominator guard. |+| Decided only | `decided_precision` | `TPd / max(TPd + FPd, 1)` | Among valid `confirmed` decisions, the fraction that are genuine positives. Abstentions and errors are excluded. |+| Decided only | `decided_recall` | `TPd / max(TPd + FNd, 1)` | Among genuine-positive cases with a decisive verdict, the fraction marked `confirmed`. This is not overall recall because positive abstentions and errors are excluded. |+| Decided only | `decided_f1` | `2 * TPd / max(2 * TPd + FPd + FNd, 1)` | Equal-weight precision-recall balance over decisive verdicts only. |+| Decided only | `decided_f2` | `5 * TPd / max(5 * TPd + FPd + 4 * FNd, 1)` | Recall-weighted precision-recall balance over decisive verdicts only. |+| Decided only | `decided_accuracy` | `(TPd + TNd) / max(D, 1)` | Fraction of valid non-abstaining decisions that are correct. |+| Decided only | `decided_mcc` | `(TPd * TNd - FPd * FNd) / max(sqrt((TPd + FPd) * (TPd + FNd) * (TNd + FPd) * (TNd + FNd)), 1)` | Matthews correlation coefficient after excluding abstentions and errors. Read it together with `decided_coverage`. |+| Decided only | `decided_coverage` | `D / max(W, 1)` | Fraction of the represented population receiving a valid `confirmed` or `not_actionable` verdict. Low coverage can make decided-only quality look artificially strong. |+| Workflow | `true_positive_retention` | `(positive cases marked confirmed or needs_review) / max(P, 1)` | Fraction of genuine alerts not automatically closed. `needs_review` counts as retained; an execution or parse error does not. |+| Workflow | `unsafe_closure_rate` | `(positive cases marked not_actionable) / max(P, 1)` | Fraction of genuine alerts the skill would incorrectly auto-close. |+| Workflow | `false_alert_auto_closure_rate` | `(negative cases marked not_actionable) / max(N, 1)` | Fraction of actual false alerts removed without human review. |+| Workflow | `false_alert_escalation_rate` | `(negative cases marked needs_review) / max(N, 1)` | Fraction of false alerts sent to a human instead of being auto-closed. Negative cases incorrectly confirmed or ending in errors are outside this numerator. |+| Workflow | `confirmed_precision` | `(positive cases marked confirmed) / max(all confirmed cases, 1)` | Among alerts placed in the confirmed queue, the fraction that are genuine. Under the current verdict mapping, this is numerically equal to `decided_precision`. |+| Workflow | `abstention_rate` | `(valid needs_review verdicts) / max(W, 1)` | Fraction of the represented population where the skill explicitly declines to decide. Execution and parsing errors are not abstentions. |+| Workflow | `remaining_analyst_workload` | `(confirmed + needs_review + execution or parse errors) / max(W, 1)` | Fraction of the represented alert queue still requiring human handling. Only a valid `not_actionable` verdict removes an alert from this workload, even when that closure is unsafe. |+| Reliability | `execution_or_parse_error_rate` | `(model errors + invalid outputs) / max(W, 1)` | Fraction of the represented population without a usable triage verdict because execution failed or the output could not be parsed as the required contract. |`schema_valid` and `strict_case_correct` are per-row assertions rather than derived aggregate metrics. `schema_valid` checks the complete `triage-finding/v0` schema. `strict_case_correct` checks the verdict against the binary SastBench label and fails for `needs_review`, malformed output, and provider errors.diff --git a/plugins/codex-security/examples/completed-scan/report.md b/plugins/codex-security/examples/completed-scan/report.mdindex 32416eaad..8a5875c1d 100644--- a/plugins/codex-security/examples/completed-scan/report.md+++ b/plugins/codex-security/examples/completed-scan/report.md@@ -15,13 +15,13 @@ The scan reviewed the canonical include paths and exclusions listed below.### Scan Summary-| Field | Value |-| --- | --- |-| Reportable findings | 1 |-| Severity mix | high: 1 |-| Confidence mix | high: 1 |-| Coverage | complete |-| Validation mode | not recorded |+| Field | Value |+| ------------------- | ------------ |+| Reportable findings | 1 |+| Severity mix | high: 1 |+| Confidence mix | high: 1 |+| Coverage | complete |+| Validation mode | not recorded |Canonical artifacts: `scan-manifest.json`, `findings.json`, and `coverage.json`. This report is a deterministic projection of those files.@@ -31,30 +31,30 @@ No explicit canonical threat-model summary was recorded.## Findings-| Finding | Severity | Confidence | Detailed write-up |-| --- | --- | --- | --- |-| [Unsafe archive extraction can escape the output directory](#finding-1) | high | high | inline below |+| Finding | Severity | Confidence | Detailed write-up |+| ----------------------------------------------------------------------- | -------- | ---------- | ----------------- |+| [Unsafe archive extraction can escape the output directory](#finding-1) | high | high | inline below |### Confidence Scale-| Label | Meaning |-| --- | --- |-| high | Direct evidence supports the finding with no material unresolved blocker. |+| Label | Meaning |+| ------ | ---------------------------------------------------------------------------------------- |+| high | Direct evidence supports the finding with no material unresolved blocker. || medium | Evidence supports a plausible issue, but material runtime or reachability proof remains. |-| low | Evidence is incomplete and the item is retained only for explicit follow-up. |+| low | Evidence is incomplete and the item is retained only for explicit follow-up. |<a id="finding-1"></a>### [1] Unsafe archive extraction can escape the output directory-| Field | Value |-| --- | --- |-| Severity | high |-| Confidence | high |+| Field | Value |+| -------------------- | ----------------------------------------------------------------------------- |+| Severity | high |+| Confidence | high || Confidence rationale | Direct source trace reaches the filesystem write without a containment check. |-| Category | path-traversal |-| CWE | CWE-22 |-| Affected lines | src/extract.py:41-44 |+| Category | path-traversal |+| CWE | CWE-22 |+| Affected lines | src/extract.py:41-44 |#### Summary@@ -83,13 +83,15 @@ Additional runtime or deployment evidence could raise or lower this severity.Normalize destinations and reject entries that escape the extraction root.Tests:+- Assert that extracting an archive entry named `../escape.txt` fails without writing outside the extraction root.Preventive controls:+- Route all archive extraction through one helper that normalizes and validates destination paths.## Reviewed Surfaces-| Surface | Risk Area | Outcome | Notes |-| --- | --- | --- | --- |+| Surface | Risk Area | Outcome | Notes |+| ------------------ | ------------ | -------- | -------------------------------------------- || Archive extraction | not recorded | Reported | No additional canonical notes were recorded. |diff --git a/plugins/codex-security/skills/attack-path-analysis/SKILL.md b/plugins/codex-security/skills/attack-path-analysis/SKILL.mdindex 247e1614a..cbcd539de 100644--- a/plugins/codex-security/skills/attack-path-analysis/SKILL.md+++ b/plugins/codex-security/skills/attack-path-analysis/SKILL.md@@ -112,5 +112,6 @@ Render attack-path facts using `references/attack-path-facts.md`.- Outside compact diff mode, save a final visible report for each candidate finding using that finding's attack-path analysis report path from `../../references/scan-artifacts.md`.-- Considerations for attack path --+- A bug matters if evidence shows an attacker could exploit it.- The attack surface should generally be one that is plausibly exposed to end users / external actors (or another actor explicitly in scope in the threat model).diff --git a/plugins/codex-security/skills/finding-discovery/SKILL.md b/plugins/codex-security/skills/finding-discovery/SKILL.mdindex 2c34dccd2..46d333422 100644--- a/plugins/codex-security/skills/finding-discovery/SKILL.md+++ b/plugins/codex-security/skills/finding-discovery/SKILL.md@@ -29,6 +29,7 @@ Read `../../references/security-guidance.md` and resolve the applicable policy bWhen a running diff scan already supplies its file inventory through `list_codex_security_review_items`, review that inventory directly and record all candidates once with `record_codex_security_discovery_candidates`. Do not generate ranked worklists, per-finding ledgers, discovery receipts, or discovery reports. Skip the legacy workflow and artifact requirements below.### Code Diff Workflow+For a targeted code diff without an existing compact inventory:- Read `../security-scan/references/scan-artifacts-and-ledger.md`.@@ -145,7 +146,6 @@ Otherwise, for each candidate include:For legacy diff-scoped discovery without a compact inventory, when candidates are emitted, create the per-finding directory from `../../references/scan-artifacts.md` and append one discovery receipt to that finding's candidate ledger. The ledger row should identify the candidate, scan scope, discovery status, affected locations, and the discovery artifact or evidence that produced it.-## Hard Rules- Use the tools to examine repository files before making decisions.diff --git a/plugins/codex-security/skills/propose-security-hardening/references/proposal-format.md b/plugins/codex-security/skills/propose-security-hardening/references/proposal-format.mdindex 6509ad21f..f0fc07771 100644--- a/plugins/codex-security/skills/propose-security-hardening/references/proposal-format.md+++ b/plugins/codex-security/skills/propose-security-hardening/references/proposal-format.md@@ -104,9 +104,7 @@ The first example is scan-backed. For ordinary documents, use the `sourceEvidenc"profile": "balanced","changeHorizons": ["incremental", "medium_term", "foundational"],"nonNegotiables": [],- "assumptions": [- "No measured latency or memory budget was supplied."- ]+ "assumptions": ["No measured latency or memory budget was supplied."]},"opportunities": [{@@ -201,13 +199,15 @@ The first example is scan-backed. For ordinary documents, use the `sourceEvidenc"validationPlan": "Run compatibility coverage for valid relative archive entries."}],- "residualRisks": [- "Containment policy can drift between call sites."- ],+ "residualRisks": ["Containment policy can drift between call sites."],"implementationReadiness": {"affectedComponents": ["src/extract.py"],- "workPackages": ["Add containment enforcement and regression coverage."],- "acceptanceCriteria": ["The original traversal PoC cannot write outside the output root."],+ "workPackages": [+ "Add containment enforcement and regression coverage."+ ],+ "acceptanceCriteria": [+ "The original traversal PoC cannot write outside the output root."+ ],"migrationNotes": [],"rollback": "Revert the focused guard and test change."}@@ -285,16 +285,20 @@ Write `hardening.md` with these headings in order. Use `Evidence Basis` for an o# Security Hardening Review: <target>## Evidence Basis+## Constraints+## Opportunity Portfolio+## Recommendation Summary+## Next Decisions```Under `Opportunity Portfolio`, use a compact table:| Opportunity | Evidence | Options | Recommendation | Proposal |-| --- | --- | --- | --- | --- |+| ----------- | -------- | ------- | -------------- | -------- |Link every proposal using its exact `proposalPath`. Make the recommendation conditional on the recorded constraints. Keep this document easy to skim; put the complete technical argument in the proposal file. Open with enough prose to orient a reader who did not participate in the scan, and use the recommendation summary to explain the reasoning in a warm design-review voice rather than merely repeating the table.@@ -310,21 +314,37 @@ Name each proposal `proposals/<opportunity-id>.md` and use these headings in ord# Security Hardening Proposal: <title>## Decision+## Executive Recommendation+## Evidence+## Current Design And Failure Mode+## Desired Invariants+## Constraints And Non-Goals+## Before Architecture+## Options+### Option 1: <baseline, when useful>+### Option 2: <first alternative>+## Comparison+## Recommendation+## Evidence Coverage And Residual Risk+## Migration And Rollout+## Validation Plan+## Implementation Work Packages+## Open Questions```@@ -353,9 +373,9 @@ Requirements:Use this shape under `Evidence` when several findings or documents contribute:-| Evidence | Finding or document | What it establishes |-| --- | --- | --- |-| `E021` | Netlink multipath scratch exhaustion | Attacker-controlled nesting can exhaust unchecked parser scratch space. |+| Evidence | Finding or document | What it establishes |+| -------- | ------------------------------------ | ----------------------------------------------------------------------- |+| `E021` | Netlink multipath scratch exhaustion | Attacker-controlled nesting can exhaust unchecked parser scratch space. |Link the finding or document title to its writeup when a distributable relative path is available. The title may be shortened for readability, but it must be specific enough that a new reader understands the reference. After defining an ID once in the proposal, later prose may use the ID alone where repetition would be awkward. In `Evidence Coverage And Residual Risk`, label every row with both the ID and short title, for example `E021 — Netlink scratch exhaustion`. Apply the same rule to canonical scan finding IDs. A complete registry in `context.md` supports auditability but does not make a bare ID self-explanatory in another document.@@ -389,14 +409,14 @@ Use Mermaid `flowchart` source in `.mmd` files. Keep diagrams compact and securiAssess these dimensions for every option:-| Dimension | Questions |-| --- | --- |-| Security | Which attack paths disappear, narrow, or remain? What new trusted component appears? |-| Performance | Does the critical path gain hops, copies, serialization, locks, or cache misses? |-| Memory | Are there new processes, buffers, indexes, queues, caches, or retained objects? |-| Reliability | How do failure isolation, retries, backpressure, recovery, and availability change? |-| Operability | What new deployment, observability, alerting, or incident response burden appears? |-| Migration | What compatibility, data, protocol, rollout, and rollback work is required? |+| Dimension | Questions |+| ----------- | ------------------------------------------------------------------------------------ |+| Security | Which attack paths disappear, narrow, or remain? What new trusted component appears? |+| Performance | Does the critical path gain hops, copies, serialization, locks, or cache misses? |+| Memory | Are there new processes, buffers, indexes, queues, caches, or retained objects? |+| Reliability | How do failure isolation, retries, backpressure, recovery, and availability change? |+| Operability | What new deployment, observability, alerting, or incident response burden appears? |+| Migration | What compatibility, data, protocol, rollout, and rollback work is required? |For unmeasured effects, name the likely mechanism and a measurement plan. A useful plan identifies the workload, metric, baseline, candidate design, and decision threshold. Do not present analogy or intuition as benchmark data.@@ -408,15 +428,25 @@ After selection, write `implementation/<option-id>.md` with:# Implementation Plan: <option title>## Selected Design And Constraints+## Source Revision And Drift Check+## Affected Components+## Ordered Work Packages+## Compatibility And Migration+## Tactical Protections During Migration+## Tests And Security Validation+## Performance And Resource Benchmarks+## Rollout And Rollback+## Acceptance Criteria+## Open Decisions```diff --git a/plugins/codex-security/skills/triage-finding/references/triage-result-contract.md b/plugins/codex-security/skills/triage-finding/references/triage-result-contract.mdindex f6f465c2b..3d1aab84b 100644--- a/plugins/codex-security/skills/triage-finding/references/triage-result-contract.md+++ b/plugins/codex-security/skills/triage-finding/references/triage-result-contract.md@@ -65,7 +65,13 @@ Each entry in `findings` must use this shape:"rank_queue": "confirmed","rank": 1,"rationale": "why this finding is more or less exploitable than other findings with the same verdict",- "drivers": ["attacker reachability", "privilege required", "preconditions", "source-to-sink control", "guard strength"]+ "drivers": [+ "attacker reachability",+ "privilege required",+ "preconditions",+ "source-to-sink control",+ "guard strength"+ ]},"evidence": ["static evidence observed"],"counterevidence": ["static evidence that weakens or defeats the claim"],diff --git a/sdk/typescript/package.json b/sdk/typescript/package.jsonindex d7d3ecba6..748b7f38a 100644--- a/sdk/typescript/package.json+++ b/sdk/typescript/package.json@@ -60,7 +60,7 @@"build:plugin": "node scripts/build-plugin.mjs","check:plugin-source": "node scripts/check-plugin-source.mjs","check:package": "node scripts/check-package.mjs",- "format": "prettier --check --ignore-path .gitignore --ignore-path .prettierignore \"**/*.{cjs,mjs,js,ts,mts,tsx,json,md}\" \"../../.github/scripts/*.mts\" \"../../examples/custom-validation/*.{mts,md}\" \"../../plugins/codex-security/native/*.{mts,md}\" \"../../evals/{deep-reducer,secret-discovery}/*.mts\" \"../../evals/triage-finding/{assertions,scripts,sastbench/assertions,sastbench/scripts}/*.mts\" \"../../evals/triage-finding/types.ts\" \"../../evals/tsconfig.json\"",+ "format": "prettier --check --ignore-path .gitignore --ignore-path .prettierignore \"**/*.{cjs,mjs,js,ts,mts,tsx,json}\" \"../../.github/scripts/*.mts\" \"../../examples/custom-validation/*.mts\" \"../../plugins/codex-security/native/*.mts\" \"../../evals/{deep-reducer,secret-discovery}/*.mts\" \"../../evals/triage-finding/{assertions,scripts,sastbench/assertions,sastbench/scripts}/*.mts\" \"../../evals/triage-finding/types.ts\" \"../../evals/tsconfig.json\" && node scripts/check-markdown.mjs","generate:models": "node scripts/generate-models.cjs","generate:models:check": "node scripts/generate-models.cjs --check","lint": "tsc --noEmit",diff --git a/sdk/typescript/scripts/check-markdown.mjs b/sdk/typescript/scripts/check-markdown.mjsnew file mode 100644index 000000000..1ef2ff028--- /dev/null+++ b/sdk/typescript/scripts/check-markdown.mjs@@ -0,0 +1,28 @@+import { execFileSync } from "node:child_process";+import { lstatSync } from "node:fs";+import { join } from "node:path";+import { fileURLToPath } from "node:url";++const root = fileURLToPath(new URL("../../../", import.meta.url));+const files = execFileSync("git", ["ls-files", "-z", "--", "*.md"], {+ cwd: root,+ encoding: "utf8",+ maxBuffer: Infinity,+})+ .split("\0")+ .filter(+ (path) =>+ path && lstatSync(join(root, path), { throwIfNoEntry: false })?.isFile(),+ );++if (files.length > 0) {+ process.chdir(root);+ process.argv = [+ process.execPath,+ fileURLToPath(import.meta.resolve("prettier/bin/prettier.cjs")),+ "--check",+ "--",+ ...files,+ ];+ await import("prettier/bin/prettier.cjs");+}diff --git a/sdk/typescript/scripts/release-pr.mjs b/sdk/typescript/scripts/release-pr.mjsindex aa912cede..67ea14a31 100644--- a/sdk/typescript/scripts/release-pr.mjs+++ b/sdk/typescript/scripts/release-pr.mjs@@ -96,7 +96,7 @@ export function generateNoteSections(changes) {}function sectionBlock(id, content) {- return `<!-- release-section: ${id}:start -->\n${content}\n<!-- release-section: ${id}:end -->`;+ return `<!-- release-section: ${id}:start -->\n\n${content}\n\n<!-- release-section: ${id}:end -->`;}function findSection(notes, id) {diff --git a/sdk/typescript/tests-ts/check-markdown.test.ts b/sdk/typescript/tests-ts/check-markdown.test.tsnew file mode 100644index 000000000..71d93f921--- /dev/null+++ b/sdk/typescript/tests-ts/check-markdown.test.ts@@ -0,0 +1,67 @@+import { expect, test } from "bun:test";+import {+ copyFile,+ mkdir,+ mkdtemp,+ rm,+ symlink,+ writeFile,+} from "node:fs/promises";+import { tmpdir } from "node:os";+import { join } from "node:path";+import { fileURLToPath } from "node:url";+import { gitText, runCommand } from "./support/shell.js";++test("checks tracked Markdown including leading-dash paths and skips deleted, untracked, and linked files", async () => {+ const root = await mkdtemp(join(tmpdir(), "markdown checks "));+ const sdk = join(root, "sdk", "typescript");+ const script = join(sdk, "scripts", "check-markdown.mjs");+ const guide = join(root, "guide with # spaces.md");+ const invalid = "# Title\n\n\n";+ try {+ await mkdir(join(sdk, "scripts"), { recursive: true });+ await copyFile(+ new URL("../scripts/check-markdown.mjs", import.meta.url),+ script,+ );+ await symlink(+ fileURLToPath(new URL("../node_modules", import.meta.url)),+ join(sdk, "node_modules"),+ "junction",+ );+ await writeFile(join(root, ".gitignore"), "node_modules/\n");+ await writeFile(join(root, "README.md"), "# Readme\n");+ await writeFile(join(root, "--plugin=fixture.md"), "# Markdown fixture\n");+ // The combined paths exceed the Windows process command-line limit.+ for (let index = 0; index < 400; index++) {+ await writeFile(+ join(root, `guide-${index}-${"x".repeat(80)}.md`),+ "# Guide\n",+ );+ }+ await writeFile(guide, invalid);+ await writeFile(join(root, "deleted.md"), invalid);+ if (process.platform !== "win32")+ await symlink("untracked.md", join(root, "linked.md"));+ gitText(["init", "--quiet"], { cwd: root });+ gitText(["add", "--", "."], { cwd: root });+ await rm(join(root, "deleted.md"));+ await writeFile(join(root, "untracked.md"), invalid);++ const failing = await runCommand("node", [script], {+ cwd: sdk,+ timeout: 30_000,+ });+ expect(failing.status).toBe(1);+ expect(failing.stdout + failing.stderr).toContain("guide with # spaces.md");++ await writeFile(guide, "# Title\n");+ const passing = await runCommand("node", [script], {+ cwd: sdk,+ timeout: 30_000,+ });+ expect(passing.status, passing.stdout + passing.stderr).toBe(0);+ } finally {+ await rm(root, { recursive: true, force: true });+ }+});diff --git a/sdk/typescript/tests-ts/container-ci-workflow.test.ts b/sdk/typescript/tests-ts/container-ci-workflow.test.tsindex 17cabb01a..3e8d50bb8 100644--- a/sdk/typescript/tests-ts/container-ci-workflow.test.ts+++ b/sdk/typescript/tests-ts/container-ci-workflow.test.ts@@ -104,7 +104,7 @@ test.each([const directory = mkdtempSync(join(tmpdir(), "container-ci-scope-"));const output = join(directory, "outputs");const script = ci.jobs["validate-title"]!.steps!.find(- (step) => step.name === "Decide CI mode",+ (step) => step.name === "Select additional checks",)!.run!;try {const result = spawnSync(diff --git a/sdk/typescript/tests-ts/release-automation.test.ts b/sdk/typescript/tests-ts/release-automation.test.tsindex d7dd4ca01..625043e6b 100644--- a/sdk/typescript/tests-ts/release-automation.test.ts+++ b/sdk/typescript/tests-ts/release-automation.test.ts@@ -5,7 +5,6 @@ import {mkdtempSync,readFileSync,rmSync,- symlinkSync,writeFileSync,} from "node:fs";import { tmpdir } from "node:os";@@ -4055,7 +4054,7 @@ describe("GitHub release workflow safeguards", () => {expect(nodeCiWorkflow).toContain("needs: validate-title");});- test("keeps required contexts stable across reduced CI", () => {+ test("keeps required contexts stable for every change", () => {const workflow = Bun.YAML.parse(nodeCiWorkflow) as {concurrency: {group: string;@@ -4091,7 +4090,6 @@ describe("GitHub release workflow safeguards", () => {)?.if,).toContain("github.event.changes.base == null");- const fullCiCondition = "needs.validate-title.outputs.ci-mode == 'full'";for (const job of ["static-checks","package",@@ -4103,26 +4101,8 @@ describe("GitHub release workflow safeguards", () => {"windows-test","windows-verify",]) {- expect(workflow.jobs[job]?.if).toBe(fullCiCondition);+ expect(workflow.jobs[job]?.if).toBeUndefined();}- expect(workflow.jobs["markdown-checks"]).toBeUndefined();- const validationSteps = workflow.jobs["validate-title"]?.steps ?? [];- expect(- validationSteps.find(- ({ name }) => name === "Check plugin source compatibility",- )?.if,- ).toBe("steps.scope.outputs.ci-mode == 'markdown'");- const markdownCommand =- validationSteps.find(({ name }) => name === "Check Markdown formatting")- ?.run ?? "";- expect(markdownCommand).toContain(- "git diff --no-renames --name-only -z HEAD^1 HEAD",- );- expect(markdownCommand).toContain("! -L");- expect(markdownCommand).toContain(- "pnpm --dir sdk/typescript exec prettier --check",- );- expect(markdownCommand).not.toContain("--ignore-path");const requiredJobCondition = "always()";expect(workflow.jobs["required-test"]?.if).toBe(requiredJobCondition);expect(workflow.jobs["windows"]?.if).toBe(requiredJobCondition);@@ -4132,13 +4112,10 @@ describe("GitHub release workflow safeguards", () => {name ===`Require every ${job === "windows" ? "Windows" : "Unix"} coverage job`,);- for (const [ciMode, validation, upstream, gateFailure] of [- ["full", "success", "success", false],- ["full", "success", "skipped", true],- ["markdown", "success", "skipped", false],- ["markdown", "failure", "skipped", true],- ["skip", "success", "skipped", true],- ["unknown", "success", "skipped", true],+ for (const [validation, upstream, gateFailure] of [+ ["success", "success", false],+ ["success", "skipped", true],+ ["failure", "skipped", true],] as const) {const values = {"needs.static-checks.result": upstream,@@ -4148,7 +4125,6 @@ describe("GitHub release workflow safeguards", () => {"needs.compatibility.result": upstream,"needs.mcp.result": upstream,"needs.test.result": upstream,- "needs.validate-title.outputs.ci-mode": ciMode,"needs.validate-title.result": validation,"needs.windows-test.result": upstream,"needs.windows-verify.result": upstream,@@ -4156,7 +4132,7 @@ describe("GitHub release workflow safeguards", () => {for (const job of ["required-test", "windows"]) {expect(evaluateWorkflowCondition(coverageGate(job)?.if ?? "", values),- `${job}: ${ciMode}/${validation}/${upstream}`,+ `${job}: ${validation}/${upstream}`,).toBe(gateFailure);}}@@ -4184,7 +4160,6 @@ describe("GitHub release workflow safeguards", () => {expect(evaluateWorkflowCondition(coverageGate(gate)?.if ?? "", {"needs.validate-title.result": "success",- "needs.validate-title.outputs.ci-mode": "full",...Object.fromEntries(dependencies.map((job) => [`needs.${job}.result`,@@ -4230,213 +4205,6 @@ describe("GitHub release workflow safeguards", () => {).toEqual([...requiredContexts].sort());});- test.each([- [- "Markdown-only PR",- "pull_request",- false,- ["README.md", "docs/guide.md"],- "markdown",- true,- ],- [- "generated-plugin Markdown-only PR",- "pull_request",- false,- ["sdk/typescript/_bundled_plugin/skills/example/SKILL.md"],- "full",- true,- ],- [- "authored-plugin skill Markdown-only PR",- "pull_request",- false,- ["plugins/codex-security/skills/example/SKILL.md"],- "full",- true,- ],- [- "authored-plugin reference Markdown-only PR",- "pull_request",- false,- ["plugins/codex-security/skills/example/references/contract.md"],- "full",- true,- ],- ["base retarget", "pull_request", true, ["README.md"], "full", false],- [- "mixed PR",- "pull_request",- false,- ["README.md", "src/index.ts"],- "full",- false,- ],- [- "source-to-Markdown rename",- "pull_request",- false,- ["src/index.ts", "docs/index.md"],- "full",- false,- ],- ["empty merge diff", "pull_request", false, [], "full", false],- ["push", "push", false, ["README.md"], "full", false],- ] as const)(- "selects CI and formatting checks for %s",- (_name, eventName, baseChanged, changedPaths, ciMode, checkMarkdown) => {- const workspace = mkdtempSync(join(tmpdir(), "release-ci-scope-"));- const output = join(workspace, "output");- const script = workflowStepShell(nodeCiWorkflow, "Decide CI mode");- const workflow = Bun.YAML.parse(nodeCiWorkflow) as {- jobs: Record<string, { steps: Array<{ name?: string; if?: string }> }>;- };- const validationSteps = workflow.jobs["validate-title"]!.steps;- const gitMock = `git() {- [[ "$*" == "diff --no-renames --name-only -z HEAD^1 HEAD" ]] || return 64- while IFS= read -r path; do- [[ -z "$path" ]] || printf '%s\\0' "$path"- done <<< "$MOCK_CHANGED_FILES"- }`;- try {- const result = spawnSync(bash, ["-c", `${gitMock}\n${script}`], {- env: {- ...process.env,- BASE_CHANGED: String(baseChanged),- EVENT_NAME: eventName,- GITHUB_OUTPUT: output,- MOCK_CHANGED_FILES: changedPaths.join("\n"),- },- });- expect(result.status).toBe(0);- const outputs: Record<string, string> = Object.fromEntries(- readFileSync(output, "utf8")- .trim()- .split("\n")- .map((line) => line.split("=")),- );- expect(outputs["ci-mode"]).toBe(ciMode);- const values = Object.fromEntries(- Object.entries(outputs).map(([key, value]) => [- `steps.scope.outputs.${key}`,- value,- ]),- );- for (const stepName of [- "Set up TypeScript tools",- "Install dependencies",- "Check Markdown formatting",- ]) {- const condition =- validationSteps.find(({ name }) => name === stepName)?.if ?? "";- expect(evaluateWorkflowCondition(condition, values), stepName).toBe(- checkMarkdown,- );- }- } finally {- rmSync(workspace, { recursive: true, force: true });- }- },- );-- test.skipIf(process.platform === "win32")(- "rejects oversized plugin Markdown in reduced CI",- async () => {- const workspace = mkdtempSync(- join(tmpdir(), "release-ci-plugin-source-"),- );- const pluginRoot = join(workspace, "plugins", "codex-security");- mkdirSync(pluginRoot, { recursive: true });- writeFileSync(join(pluginRoot, "README.md"), "x".repeat(150_001));- spawnSync("git", ["init", "--quiet", workspace]);- spawnSync("git", [- "-C",- workspace,- "add",- "--",- "plugins/codex-security/README.md",- ]);- try {- const packageRoot = fileURLToPath(new URL("..", import.meta.url));- const build = await runCommand(- "node",- [- join(packageRoot, "node_modules", "typescript", "bin", "tsc"),- "--project",- join(packageRoot, "tsconfig.ci.json"),- "--outDir",- workspace,- ],- { timeout: 30_000 },- );- expect(build.status, build.stdout + build.stderr).toBe(0);- const result = spawnSync(- bash,- [- "-c",- workflowStepShell(- nodeCiWorkflow,- "Check plugin source compatibility",- ),- ],- { cwd: workspace, encoding: "utf8" },- );- expect(result.status).toBe(1);- expect(result.stderr).toContain(- "README.md: file is 150001 bytes; maximum is 150000 bytes",- );- } finally {- rmSync(workspace, { recursive: true, force: true });- }- },- );-- test.skipIf(process.platform === "win32")(- "formats every changed regular non-symlink Markdown file",- () => {- const workspace = mkdtempSync(join(tmpdir(), "release-ci-markdown-"));- const argsFile = join(workspace, "prettier-args");- const guide = join(workspace, "docs", "guide with spaces.md");- const readme = join(workspace, "README.md");- mkdirSync(join(workspace, "docs"));- writeFileSync(guide, "# Guide\n");- writeFileSync(readme, "# Readme\n");- symlinkSync(readme, join(workspace, "docs", "link.md"));- const mocks = `git() {- printf '%s\\0' README.md 'docs/guide with spaces.md' docs/link.md deleted.md- }- pnpm() { printf '%s\\n' "$@" > "$MOCK_PNPM_ARGS"; }`;- try {- const result = spawnSync(- bash,- [- "-c",- `${mocks}\n${workflowStepShell(nodeCiWorkflow, "Check Markdown formatting")}`,- ],- {- env: {- ...process.env,- GITHUB_WORKSPACE: workspace,- MOCK_PNPM_ARGS: argsFile,- },- },- );- expect(result.status).toBe(0);- expect(readFileSync(argsFile, "utf8").trim().split("\n")).toEqual([- "--dir",- "sdk/typescript",- "exec",- "prettier",- "--check",- readme,- guide,- ]);- } finally {- rmSync(workspace, { recursive: true, force: true });- }- },- );-test("documents a canonical historical-summary prefix block", () => {const start = "<!-- codex-security-release-summary:start -->";const end = "<!-- codex-security-release-summary:end -->";diff --git a/sdk/typescript/tests-ts/release-pr.test.ts b/sdk/typescript/tests-ts/release-pr.test.tsindex 518ae7289..fadb62bb2 100644--- a/sdk/typescript/tests-ts/release-pr.test.ts+++ b/sdk/typescript/tests-ts/release-pr.test.ts@@ -3,6 +3,7 @@ import { mkdtempSync, readFileSync, rmSync } from "node:fs";import { tmpdir } from "node:os";import { join } from "node:path";import { afterEach, describe, expect, test } from "bun:test";+import { check } from "prettier";type Change = {title: string;@@ -760,6 +761,17 @@ describe("pre-1.0 release policy", () => {).toBe("0.2.0");});+ test("generates formatted release notes", async () => {+ for (const changes of [+ [],+ [change("fix: repair behavior")],+ [change("fix!: change behavior")],+ ]) {+ const notes = createReleasePlan(history(changes)).files[notesPath]!;+ expect(await check(notes, { parser: "markdown" })).toBe(true);+ }+ });+test("recomputes the whole cycle, including hidden changes, without incrementing on reruns", () => {const changes = [change("feat: an addition"),diff --git a/sdk/typescript/tests-ts/workflow-quality.test.ts b/sdk/typescript/tests-ts/workflow-quality.test.tsindex 92a0407ed..e58921b3b 100644--- a/sdk/typescript/tests-ts/workflow-quality.test.ts+++ b/sdk/typescript/tests-ts/workflow-quality.test.ts@@ -26,7 +26,7 @@ bashTest("selects workflow checks for workflow changes and main pushes",async () => {const scope = ci.jobs["validate-title"]!.steps.find(- (step) => step.name === "Decide CI mode",+ (step) => step.name === "Select additional checks",)!;const directory = await mkdtemp(join(tmpdir(), "workflow-quality-"));try {