@openai/codex-security 0.1.21 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/README.md +549 -1
  2. package/_bundled_plugin/.codex-plugin/plugin.json +1 -1
  3. package/_bundled_plugin/.mcp.json +1 -0
  4. package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
  5. package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
  6. package/_bundled_plugin/references/config-preflight.md +2 -30
  7. package/_bundled_plugin/references/core-scan.md +1 -1
  8. package/_bundled_plugin/references/final-report.md +1 -1
  9. package/_bundled_plugin/references/finding-detail-fields.md +5 -10
  10. package/_bundled_plugin/references/sarif-adapter.md +1 -1
  11. package/_bundled_plugin/references/scan-contract.md +10 -0
  12. package/_bundled_plugin/scripts/config_preflight.py +2 -8
  13. package/_bundled_plugin/scripts/deep_scan_workbench.py +6 -1
  14. package/_bundled_plugin/scripts/finalize_scan_contract.py +115 -76
  15. package/_bundled_plugin/scripts/finding_preview.py +22 -4
  16. package/_bundled_plugin/scripts/generate_in_scope_files.py +29 -9
  17. package/_bundled_plugin/scripts/generate_rank_input.py +1 -5
  18. package/_bundled_plugin/scripts/rank_preview.py +1 -0
  19. package/_bundled_plugin/scripts/report_projection.py +8 -14
  20. package/_bundled_plugin/scripts/validate_scan_contract.py +1 -3
  21. package/_bundled_plugin/scripts/windows_scan_local_files.py +90 -6
  22. package/_bundled_plugin/scripts/workbench_cli.py +27 -1
  23. package/_bundled_plugin/scripts/workbench_dashboard.py +138 -0
  24. package/_bundled_plugin/scripts/workbench_db.py +110 -539
  25. package/_bundled_plugin/scripts/workbench_finding_index.py +42 -24
  26. package/_bundled_plugin/scripts/workbench_finding_workflows.py +208 -0
  27. package/_bundled_plugin/scripts/workbench_findings.py +221 -0
  28. package/_bundled_plugin/scripts/workbench_native_indexes.py +1 -2
  29. package/_bundled_plugin/scripts/workbench_publication.py +520 -0
  30. package/_bundled_plugin/scripts/workbench_remediation.py +37 -0
  31. package/_bundled_plugin/scripts/workbench_saved_results.py +322 -89
  32. package/_bundled_plugin/scripts/workbench_scan_history.py +1 -2
  33. package/_bundled_plugin/scripts/workbench_scan_usage.py +9 -33
  34. package/_bundled_plugin/scripts/workbench_schema.py +276 -58
  35. package/_bundled_plugin/scripts/workbench_target.py +30 -6
  36. package/_bundled_plugin/scripts/workbench_validation.py +1 -5
  37. package/_bundled_plugin/skills/assess-patch-risk/SKILL.md +1 -5
  38. package/_bundled_plugin/skills/attack-path-analysis/references/severity-policy.md +6 -1
  39. package/_bundled_plugin/skills/track-findings/SKILL.md +2 -0
  40. package/dist/api.d.ts +5 -1
  41. package/dist/api.d.ts.map +1 -1
  42. package/dist/api.js +135 -27
  43. package/dist/api.js.map +1 -1
  44. package/dist/cli.d.ts +4 -0
  45. package/dist/cli.d.ts.map +1 -1
  46. package/dist/cli.js +158 -62
  47. package/dist/cli.js.map +1 -1
  48. package/dist/cloud-publish.js +5 -1
  49. package/dist/cloud-publish.js.map +1 -1
  50. package/dist/contract.d.ts +1 -0
  51. package/dist/contract.d.ts.map +1 -1
  52. package/dist/contract.js +9 -0
  53. package/dist/contract.js.map +1 -1
  54. package/dist/custom-publish.d.ts +22 -0
  55. package/dist/custom-publish.d.ts.map +1 -0
  56. package/dist/custom-publish.js +47 -0
  57. package/dist/custom-publish.js.map +1 -0
  58. package/dist/custom-validation-prompt.js +1 -1
  59. package/dist/custom-validation-prompt.js.map +1 -1
  60. package/dist/deduplication/checkpointed-review.d.ts +16 -0
  61. package/dist/deduplication/checkpointed-review.d.ts.map +1 -0
  62. package/dist/deduplication/checkpointed-review.js +76 -0
  63. package/dist/deduplication/checkpointed-review.js.map +1 -0
  64. package/dist/deduplication/codex-review.d.ts +21 -0
  65. package/dist/deduplication/codex-review.d.ts.map +1 -0
  66. package/dist/deduplication/codex-review.js +252 -0
  67. package/dist/deduplication/codex-review.js.map +1 -0
  68. package/dist/deduplication/deduplication-prompts.d.ts +8 -0
  69. package/dist/deduplication/deduplication-prompts.d.ts.map +1 -0
  70. package/dist/deduplication/deduplication-prompts.js +35 -0
  71. package/dist/deduplication/deduplication-prompts.js.map +1 -0
  72. package/dist/deduplication/deduplication-reviewer.d.ts +46 -0
  73. package/dist/deduplication/deduplication-reviewer.d.ts.map +1 -0
  74. package/dist/deduplication/deduplication-reviewer.js +105 -0
  75. package/dist/deduplication/deduplication-reviewer.js.map +1 -0
  76. package/dist/deduplication/deduplication.d.ts +6 -0
  77. package/dist/deduplication/deduplication.d.ts.map +1 -0
  78. package/dist/deduplication/deduplication.js +85 -0
  79. package/dist/deduplication/deduplication.js.map +1 -0
  80. package/dist/deduplication/scan.d.ts +16 -0
  81. package/dist/deduplication/scan.d.ts.map +1 -0
  82. package/dist/deduplication/scan.js +101 -0
  83. package/dist/deduplication/scan.js.map +1 -0
  84. package/dist/deep-progress.d.ts +21 -0
  85. package/dist/deep-progress.d.ts.map +1 -0
  86. package/dist/deep-progress.js +108 -0
  87. package/dist/deep-progress.js.map +1 -0
  88. package/dist/finding-dedupe-groups.d.ts +7 -0
  89. package/dist/finding-dedupe-groups.d.ts.map +1 -0
  90. package/dist/finding-dedupe-groups.js +2 -0
  91. package/dist/finding-dedupe-groups.js.map +1 -0
  92. package/dist/finding-retrieval.d.ts +13 -0
  93. package/dist/finding-retrieval.d.ts.map +1 -0
  94. package/dist/finding-retrieval.js +2 -0
  95. package/dist/finding-retrieval.js.map +1 -0
  96. package/dist/finding-workflow.d.ts +53 -0
  97. package/dist/finding-workflow.d.ts.map +1 -0
  98. package/dist/finding-workflow.js +117 -0
  99. package/dist/finding-workflow.js.map +1 -0
  100. package/dist/findings-client.d.ts +15 -0
  101. package/dist/findings-client.d.ts.map +1 -0
  102. package/dist/findings-client.js +60 -0
  103. package/dist/findings-client.js.map +1 -0
  104. package/dist/index.d.ts +5 -0
  105. package/dist/index.d.ts.map +1 -1
  106. package/dist/index.js +2 -0
  107. package/dist/index.js.map +1 -1
  108. package/dist/publication.js +28 -40
  109. package/dist/publication.js.map +1 -1
  110. package/dist/runtime.d.ts +5 -1
  111. package/dist/runtime.d.ts.map +1 -1
  112. package/dist/runtime.js +119 -13
  113. package/dist/runtime.js.map +1 -1
  114. package/dist/saved-scan.d.ts +15 -0
  115. package/dist/saved-scan.d.ts.map +1 -0
  116. package/dist/saved-scan.js +68 -0
  117. package/dist/saved-scan.js.map +1 -0
  118. package/dist/scan-activity.d.ts.map +1 -1
  119. package/dist/scan-activity.js +12 -2
  120. package/dist/scan-activity.js.map +1 -1
  121. package/dist/scan-comparison.d.ts +3 -2
  122. package/dist/scan-comparison.d.ts.map +1 -1
  123. package/dist/scan-comparison.js +1 -1
  124. package/dist/scan-comparison.js.map +1 -1
  125. package/dist/server/dashboard/THIRD_PARTY_NOTICES.txt +276 -0
  126. package/dist/server/dashboard/app.css +2 -0
  127. package/dist/server/dashboard/app.js +66 -0
  128. package/dist/server/dashboard/index.html +18 -0
  129. package/dist/server/dashboard-types.d.ts +45 -0
  130. package/dist/server/dashboard-types.d.ts.map +1 -0
  131. package/dist/server/dashboard-types.js +2 -0
  132. package/dist/server/dashboard-types.js.map +1 -0
  133. package/dist/server/dashboard.d.ts +6 -0
  134. package/dist/server/dashboard.d.ts.map +1 -0
  135. package/dist/server/dashboard.js +45 -0
  136. package/dist/server/dashboard.js.map +1 -0
  137. package/dist/server/embeddings.d.ts +16 -0
  138. package/dist/server/embeddings.d.ts.map +1 -0
  139. package/dist/server/embeddings.js +114 -0
  140. package/dist/server/embeddings.js.map +1 -0
  141. package/dist/server/errors.d.ts +5 -0
  142. package/dist/server/errors.d.ts.map +1 -0
  143. package/dist/server/errors.js +8 -0
  144. package/dist/server/errors.js.map +1 -0
  145. package/dist/server/findings-service.d.ts +20 -0
  146. package/dist/server/findings-service.d.ts.map +1 -0
  147. package/dist/server/findings-service.js +31 -0
  148. package/dist/server/findings-service.js.map +1 -0
  149. package/dist/server/index.d.ts +2 -0
  150. package/dist/server/index.d.ts.map +1 -0
  151. package/dist/server/index.js +6 -0
  152. package/dist/server/index.js.map +1 -0
  153. package/dist/server/routes.d.ts +6 -0
  154. package/dist/server/routes.d.ts.map +1 -0
  155. package/dist/server/routes.js +86 -0
  156. package/dist/server/routes.js.map +1 -0
  157. package/dist/server/serve.d.ts +2 -0
  158. package/dist/server/serve.d.ts.map +1 -0
  159. package/dist/server/serve.js +28 -0
  160. package/dist/server/serve.js.map +1 -0
  161. package/dist/server/server.d.ts +10 -0
  162. package/dist/server/server.d.ts.map +1 -0
  163. package/dist/server/server.js +17 -0
  164. package/dist/server/server.js.map +1 -0
  165. package/dist/server/sqlite-store.d.ts +22 -0
  166. package/dist/server/sqlite-store.d.ts.map +1 -0
  167. package/dist/server/sqlite-store.js +82 -0
  168. package/dist/server/sqlite-store.js.map +1 -0
  169. package/dist/server/storage.d.ts +32 -0
  170. package/dist/server/storage.d.ts.map +1 -0
  171. package/dist/server/storage.js +2 -0
  172. package/dist/server/storage.js.map +1 -0
  173. package/dist/server/validation.d.ts +17 -0
  174. package/dist/server/validation.d.ts.map +1 -0
  175. package/dist/server/validation.js +53 -0
  176. package/dist/server/validation.js.map +1 -0
  177. package/dist/trusted-executable.d.ts.map +1 -1
  178. package/dist/trusted-executable.js +2 -1
  179. package/dist/trusted-executable.js.map +1 -1
  180. package/dist/version.d.ts +1 -1
  181. package/dist/version.js +1 -1
  182. package/dist/version.js.map +1 -1
  183. package/package.json +17 -5
@@ -1,6 +1,7 @@
1
1
  """SQLite schema history for the Codex Security workbench."""
2
2
 
3
3
  import argparse
4
+ import json
4
5
  import sqlite3
5
6
  from collections.abc import Callable
6
7
 
@@ -697,9 +698,205 @@ MIGRATIONS = (
697
698
  ALTER TABLE deep_scan_runs ADD COLUMN publication_error_message TEXT;
698
699
  """,
699
700
  ),
701
+ (
702
+ 33,
703
+ "store complete findings and embeddings without a scan",
704
+ """
705
+ ALTER TABLE findings ADD COLUMN details_json TEXT;
706
+
707
+ UPDATE findings SET details_json = (
708
+ SELECT details_json FROM finding_occurrences
709
+ WHERE finding_id = findings.id AND details_json != '{}'
710
+ ORDER BY created_at DESC, id DESC LIMIT 1
711
+ );
712
+
713
+ CREATE TABLE finding_embeddings (
714
+ finding_id TEXT PRIMARY KEY REFERENCES findings(id) ON DELETE CASCADE,
715
+ model TEXT NOT NULL,
716
+ vector_json TEXT NOT NULL
717
+ );
718
+
719
+ CREATE TRIGGER invalidate_finding_embedding
720
+ AFTER UPDATE OF details_json ON findings
721
+ WHEN OLD.details_json IS NOT NEW.details_json
722
+ BEGIN
723
+ DELETE FROM finding_embeddings WHERE finding_id = NEW.id;
724
+ END;
725
+ """,
726
+ ),
727
+ (
728
+ 34,
729
+ "associate findings with repositories",
730
+ """
731
+ CREATE TABLE finding_repositories (
732
+ repository_id TEXT NOT NULL,
733
+ finding_id TEXT NOT NULL REFERENCES findings(id) ON DELETE CASCADE,
734
+ PRIMARY KEY (repository_id, finding_id)
735
+ );
736
+
737
+ INSERT OR IGNORE INTO finding_repositories (repository_id, finding_id)
738
+ SELECT scans.target_id, finding_occurrences.finding_id
739
+ FROM finding_occurrences JOIN scans ON scans.id = finding_occurrences.scan_id
740
+ WHERE scans.target_id IS NOT NULL;
741
+ """,
742
+ ),
743
+ (
744
+ 35,
745
+ "persist finding dedupe groups",
746
+ """
747
+ CREATE TABLE finding_dedupe_groups (
748
+ id TEXT PRIMARY KEY,
749
+ created_at TEXT NOT NULL
750
+ );
751
+
752
+ CREATE TABLE finding_dedupe_group_members (
753
+ group_id TEXT NOT NULL REFERENCES finding_dedupe_groups(id) ON DELETE CASCADE,
754
+ finding_id TEXT NOT NULL REFERENCES findings(id),
755
+ PRIMARY KEY (group_id, finding_id)
756
+ );
757
+
758
+ CREATE INDEX finding_dedupe_groups_by_finding
759
+ ON finding_dedupe_group_members(finding_id, group_id);
760
+ """,
761
+ ),
762
+ (
763
+ 36,
764
+ "persist local findings workflows",
765
+ """
766
+ CREATE TABLE finding_workflows (
767
+ id TEXT PRIMARY KEY,
768
+ state_json TEXT NOT NULL,
769
+ created_at TEXT NOT NULL,
770
+ updated_at TEXT NOT NULL
771
+ );
772
+ """,
773
+ ),
774
+ (
775
+ 37,
776
+ "checkpoint validated dedupe reviews",
777
+ """
778
+ CREATE TABLE finding_workflow_reviews (
779
+ workflow_id TEXT NOT NULL REFERENCES finding_workflows(id) ON DELETE CASCADE,
780
+ review_key TEXT NOT NULL,
781
+ binding_json TEXT NOT NULL,
782
+ result_json TEXT NOT NULL,
783
+ created_at TEXT NOT NULL,
784
+ PRIMARY KEY (workflow_id, review_key)
785
+ );
786
+ """,
787
+ ),
788
+ (
789
+ 38,
790
+ "store findings workflow metadata in columns",
791
+ """
792
+ ALTER TABLE finding_workflows RENAME COLUMN state_json TO results_json;
793
+ ALTER TABLE finding_workflows ADD COLUMN repository_path TEXT;
794
+ ALTER TABLE finding_workflows ADD COLUMN scan_request_digest TEXT;
795
+ ALTER TABLE finding_workflows ADD COLUMN scan_id TEXT;
796
+ ALTER TABLE finding_workflows ADD COLUMN scan_dir TEXT;
797
+ ALTER TABLE finding_workflows ADD COLUMN artifact_digest TEXT;
798
+ ALTER TABLE finding_workflows ADD COLUMN destination TEXT;
799
+ ALTER TABLE finding_workflows ADD COLUMN scope_repository_id TEXT;
800
+ ALTER TABLE finding_workflows ADD COLUMN scope_all_repositories INTEGER;
801
+ ALTER TABLE finding_workflows ADD COLUMN scan_status TEXT NOT NULL DEFAULT 'pending';
802
+ ALTER TABLE finding_workflows ADD COLUMN scan_error TEXT;
803
+ ALTER TABLE finding_workflows ADD COLUMN publish_status TEXT NOT NULL DEFAULT 'pending';
804
+ ALTER TABLE finding_workflows ADD COLUMN publish_error TEXT;
805
+ ALTER TABLE finding_workflows ADD COLUMN dedupe_status TEXT NOT NULL DEFAULT 'pending';
806
+ ALTER TABLE finding_workflows ADD COLUMN dedupe_error TEXT;
807
+ """,
808
+ ),
809
+ (
810
+ 39,
811
+ "store dedupe checkpoint bindings in columns",
812
+ """
813
+ ALTER TABLE finding_workflow_reviews RENAME COLUMN binding_json TO prompt_digest;
814
+ ALTER TABLE finding_workflow_reviews ADD COLUMN review_contract_version INTEGER;
815
+ ALTER TABLE finding_workflow_reviews ADD COLUMN codex_version TEXT;
816
+ ALTER TABLE finding_workflow_reviews ADD COLUMN source_repository_path TEXT;
817
+ ALTER TABLE finding_workflow_reviews ADD COLUMN source_revision TEXT;
818
+ ALTER TABLE finding_workflow_reviews ADD COLUMN source_refs_digest TEXT;
819
+ ALTER TABLE finding_workflow_reviews ADD COLUMN source_content_digest TEXT;
820
+ ALTER TABLE finding_workflow_reviews ADD COLUMN scope_repository_id TEXT;
821
+ ALTER TABLE finding_workflow_reviews ADD COLUMN scope_all_repositories INTEGER;
822
+ ALTER TABLE finding_workflow_reviews ADD COLUMN model TEXT;
823
+ ALTER TABLE finding_workflow_reviews ADD COLUMN effort TEXT;
824
+ ALTER TABLE finding_workflow_reviews ADD COLUMN settings_digest TEXT;
825
+ ALTER TABLE finding_workflow_reviews ADD COLUMN contract_digest TEXT;
826
+ """,
827
+ ),
700
828
  )
701
829
 
702
830
 
831
+ def migrate_finding_workflow_review_columns(connection: sqlite3.Connection) -> None:
832
+ for row in connection.execute(
833
+ "SELECT workflow_id, review_key, prompt_digest FROM finding_workflow_reviews"
834
+ ).fetchall():
835
+ binding = json.loads(row["prompt_digest"])
836
+ source = binding["source"]
837
+ scope = binding["scope"]
838
+ connection.execute(
839
+ """UPDATE finding_workflow_reviews SET review_contract_version = ?, codex_version = ?,
840
+ source_repository_path = ?, source_revision = ?, source_refs_digest = ?,
841
+ source_content_digest = ?, scope_repository_id = ?, scope_all_repositories = ?,
842
+ model = ?, effort = ?, settings_digest = ?, prompt_digest = ?, contract_digest = ?
843
+ WHERE workflow_id = ? AND review_key = ?""",
844
+ (
845
+ binding["version"],
846
+ binding["codexVersion"],
847
+ source["repository"],
848
+ source["revision"],
849
+ source["refsDigest"],
850
+ source["content"],
851
+ scope.get("repositoryId"),
852
+ scope.get("allRepositories"),
853
+ binding["model"],
854
+ binding["effort"],
855
+ binding.get("settingsDigest"),
856
+ binding["promptDigest"],
857
+ binding["contractDigest"],
858
+ row["workflow_id"],
859
+ row["review_key"],
860
+ ),
861
+ )
862
+
863
+
864
+ def migrate_finding_workflow_columns(connection: sqlite3.Connection) -> None:
865
+ # Rename/backfill in place so existing checkpoint foreign keys and rows survive.
866
+ for row in connection.execute("SELECT id, results_json FROM finding_workflows").fetchall():
867
+ state = json.loads(row["results_json"])
868
+ scope = state.get("scope", {})
869
+ stages = state["stages"]
870
+ results = {stage: value["result"] for stage, value in stages.items() if "result" in value}
871
+ if "pendingWrite" in stages["dedupe"]:
872
+ results["dedupePendingWrite"] = stages["dedupe"]["pendingWrite"]
873
+ connection.execute(
874
+ """UPDATE finding_workflows SET
875
+ repository_path = ?, scan_request_digest = ?, scan_id = ?, scan_dir = ?,
876
+ artifact_digest = ?, destination = ?, scope_repository_id = ?, scope_all_repositories = ?,
877
+ scan_status = ?, scan_error = ?, publish_status = ?, publish_error = ?,
878
+ dedupe_status = ?, dedupe_error = ?, results_json = ? WHERE id = ?""",
879
+ (
880
+ state.get("repositoryPath"),
881
+ state.get("scanRequestDigest"),
882
+ state.get("scanId"),
883
+ state.get("scanDir"),
884
+ state.get("artifactDigest"),
885
+ state.get("destination"),
886
+ scope.get("repositoryId"),
887
+ scope.get("allRepositories"),
888
+ stages["scan"]["status"],
889
+ stages["scan"].get("error"),
890
+ stages["publish"]["status"],
891
+ stages["publish"].get("error"),
892
+ stages["dedupe"]["status"],
893
+ stages["dedupe"].get("error"),
894
+ json.dumps(results, allow_nan=False),
895
+ row["id"],
896
+ ),
897
+ )
898
+
899
+
703
900
  def apply_migrations(
704
901
  connection: sqlite3.Connection,
705
902
  migrations: tuple[tuple[int, str, str], ...],
@@ -780,6 +977,10 @@ def apply_migrations(
780
977
  else:
781
978
  for statement in sql_statements(sql):
782
979
  connection.execute(statement)
980
+ if version == 38:
981
+ migrate_finding_workflow_columns(connection)
982
+ elif version == 39:
983
+ migrate_finding_workflow_review_columns(connection)
783
984
  connection.execute(
784
985
  "INSERT INTO schema_migrations (version, name, applied_at) VALUES (?, ?, ?)",
785
986
  (version, name, now()),
@@ -797,19 +998,26 @@ def apply_migrations(
797
998
  def normalize_pre_release_execution_profile_migrations(
798
999
  connection: sqlite3.Connection, timestamp: str
799
1000
  ) -> None:
1001
+ scan_columns = {row["name"] for row in connection.execute("PRAGMA table_info(scans)")}
1002
+ workspace_columns = {row["name"] for row in connection.execute("PRAGMA table_info(workspaces)")}
1003
+ legacy_columns = {"execution_model", "reasoning_effort"}
1004
+ renamed_columns = {
1005
+ "legacy_execution_model",
1006
+ "legacy_reasoning_effort",
1007
+ }
800
1008
  execution_migrations = {
801
1009
  row["version"]: row["name"]
802
1010
  for row in connection.execute(
803
- "SELECT version, name FROM schema_migrations WHERE version IN (11, 12, 25, 26)"
1011
+ "SELECT version, name FROM schema_migrations WHERE version IN (11, 12, 25)"
804
1012
  )
805
1013
  }
806
- legacy_names = {
807
- 11: "scan execution profiles",
808
- 12: "dynamic scan execution profiles",
809
- }
810
- released_names = {
811
- 11: "deep scan orchestration state",
812
- 12: "scan continuation threads",
1014
+ supported_execution_migrations = {
1015
+ 11: {"deep scan orchestration state", "scan execution profiles"},
1016
+ 12: {
1017
+ "scan continuation threads",
1018
+ "scan execution profiles",
1019
+ "dynamic scan execution profiles",
1020
+ },
813
1021
  }
814
1022
  model_migration_name = "persist scan model settings"
815
1023
  if execution_migrations.get(25) == "dynamic scan execution profiles":
@@ -818,50 +1026,36 @@ def normalize_pre_release_execution_profile_migrations(
818
1026
  (model_migration_name, "dynamic scan execution profiles"),
819
1027
  )
820
1028
  execution_migrations[25] = model_migration_name
821
- has_legacy_profile_history = execution_migrations.get(11) == legacy_names[11]
822
-
823
- scan_columns = {
824
- row["name"] for row in connection.execute("PRAGMA table_info(scans)")
825
- }
826
- workspace_columns = {
827
- row["name"] for row in connection.execute("PRAGMA table_info(workspaces)")
828
- }
829
- has_legacy_profile_columns = (
830
- "execution_model" in scan_columns or "execution_model" in workspace_columns
1029
+ has_legacy_profile_history = any(
1030
+ execution_migrations.get(version) in legacy_names
1031
+ for version, legacy_names in (
1032
+ (11, {"scan execution profiles"}),
1033
+ (12, {"scan execution profiles", "dynamic scan execution profiles"}),
1034
+ )
1035
+ )
1036
+ has_legacy_profile_columns = any(
1037
+ column in columns
1038
+ for column, columns in (
1039
+ ("execution_model", scan_columns),
1040
+ ("execution_model", workspace_columns),
1041
+ ("reasoning_effort", workspace_columns),
1042
+ )
831
1043
  )
832
1044
  if not (has_legacy_profile_history or has_legacy_profile_columns):
833
1045
  return
834
1046
 
835
- if (
836
- any(
837
- execution_migrations.get(version)
838
- not in (None, released_names[version], legacy_names[version])
839
- for version in (11, 12)
840
- )
841
- or (
842
- has_legacy_profile_history
843
- and execution_migrations.get(12)
844
- not in (None, legacy_names[12], released_names[12])
845
- )
846
- or (
847
- not has_legacy_profile_history
848
- and execution_migrations.get(12) == legacy_names[12]
849
- )
1047
+ if any(
1048
+ execution_migrations.get(version) not in ({None} | supported_names)
1049
+ for version, supported_names in supported_execution_migrations.items()
850
1050
  ):
851
1051
  raise SystemExit(
852
1052
  "The Codex Security database has an unsupported execution-profile migration history."
853
1053
  )
854
1054
 
855
- expected_legacy_columns = {"execution_model", "reasoning_effort"}
856
- renamed_legacy_columns = {
857
- "legacy_execution_model",
858
- "legacy_reasoning_effort",
859
- }
860
- if has_legacy_profile_columns and (
861
- not expected_legacy_columns.issubset(scan_columns)
862
- or not expected_legacy_columns.issubset(workspace_columns)
863
- or renamed_legacy_columns.intersection(scan_columns)
864
- or renamed_legacy_columns.intersection(workspace_columns)
1055
+ if has_legacy_profile_columns and not (
1056
+ legacy_columns <= scan_columns
1057
+ and legacy_columns <= workspace_columns
1058
+ and not renamed_columns.intersection(scan_columns | workspace_columns)
865
1059
  ):
866
1060
  raise SystemExit(
867
1061
  "The Codex Security database has an unsupported execution-profile migration history."
@@ -878,7 +1072,7 @@ def normalize_pre_release_execution_profile_migrations(
878
1072
 
879
1073
  # Keep the historical values and constraints for recovery while moving
880
1074
  # them out of the namespace used by the current independent scan settings.
881
- for table in ("workspaces", "scans") if has_legacy_profile_columns else ():
1075
+ for table in ("workspaces", "scans"):
882
1076
  connection.execute(
883
1077
  f"ALTER TABLE {table} RENAME COLUMN execution_model TO legacy_execution_model"
884
1078
  )
@@ -887,22 +1081,22 @@ def normalize_pre_release_execution_profile_migrations(
887
1081
  )
888
1082
  add_column_if_missing(connection, "scans", "model", "TEXT")
889
1083
  add_column_if_missing(connection, "scans", "reasoning_effort", "TEXT")
890
- if has_legacy_profile_columns:
1084
+ connection.execute(
1085
+ """
1086
+ UPDATE scans
1087
+ SET model = COALESCE(model, legacy_execution_model),
1088
+ reasoning_effort = COALESCE(reasoning_effort, legacy_reasoning_effort)
1089
+ """
1090
+ )
1091
+ for version, name in (
1092
+ (11, "scan execution profiles"),
1093
+ (12, "scan execution profiles"),
1094
+ (12, "dynamic scan execution profiles"),
1095
+ ):
891
1096
  connection.execute(
892
- """
893
- UPDATE scans
894
- SET model = COALESCE(model, legacy_execution_model),
895
- reasoning_effort = legacy_reasoning_effort
896
- WHERE legacy_execution_model IS NOT NULL
897
- OR legacy_reasoning_effort IS NOT NULL
898
- """
1097
+ "DELETE FROM schema_migrations WHERE version = ? AND name = ?",
1098
+ (version, name),
899
1099
  )
900
- if has_legacy_profile_history:
901
- for version, name in legacy_names.items():
902
- connection.execute(
903
- "DELETE FROM schema_migrations WHERE version = ? AND name = ?",
904
- (version, name),
905
- )
906
1100
  if execution_migrations.get(25) is None:
907
1101
  connection.execute(
908
1102
  "INSERT INTO schema_migrations (version, name, applied_at) VALUES (?, ?, ?)",
@@ -911,6 +1105,8 @@ def normalize_pre_release_execution_profile_migrations(
911
1105
 
912
1106
 
913
1107
  def normalize_pre_release_migrations(connection: sqlite3.Connection, timestamp: str) -> None:
1108
+ normalize_mirror_lineage_migrations(connection)
1109
+
914
1110
  completion_warning_migration = connection.execute(
915
1111
  "SELECT name FROM schema_migrations WHERE version = 25"
916
1112
  ).fetchone()
@@ -1137,6 +1333,28 @@ def normalize_pre_release_migrations(connection: sqlite3.Connection, timestamp:
1137
1333
  )
1138
1334
 
1139
1335
 
1336
+ def normalize_mirror_lineage_migrations(connection: sqlite3.Connection) -> None:
1337
+ mirror_names = {
1338
+ 29: "freeze stopped scan source digests",
1339
+ 30: "separate deep scan publication failures",
1340
+ }
1341
+ migrations = {
1342
+ row["version"]: row["name"]
1343
+ for row in connection.execute(
1344
+ "SELECT version, name FROM schema_migrations WHERE version BETWEEN 29 AND 32"
1345
+ )
1346
+ }
1347
+ if not any(migrations.get(version) == name for version, name in mirror_names.items()):
1348
+ return
1349
+ if migrations != mirror_names:
1350
+ raise SystemExit("The Codex Security database has an unsupported mirror migration history.")
1351
+ for old_version, new_version in ((30, 32), (29, 31)):
1352
+ connection.execute(
1353
+ "UPDATE schema_migrations SET version = ? WHERE version = ? AND name = ?",
1354
+ (new_version, old_version, mirror_names[old_version]),
1355
+ )
1356
+
1357
+
1140
1358
  def repair_deep_scan_migration(connection: sqlite3.Connection) -> None:
1141
1359
  scan_columns = {row["name"] for row in connection.execute("PRAGMA table_info(scans)")}
1142
1360
  owner_column_missing = "deep_scan_owner_thread_id" not in scan_columns
@@ -414,14 +414,38 @@ def git_directory_snapshot_paths(target: Path) -> list[Path] | None:
414
414
  return sorted(set(paths))
415
415
 
416
416
 
417
- def directory_content_digest(target: Path, *, excluded: tuple[Path, ...] = ()) -> str:
417
+ def source_directory_snapshot_paths(target: Path) -> list[Path]:
418
+ paths: list[Path] = []
419
+ pending = [target]
420
+ while pending:
421
+ for path in pending.pop().iterdir():
422
+ if path.name == ".git":
423
+ continue
424
+ paths.append(path)
425
+ metadata = path.lstat()
426
+ # Name-surrogate reparse points include Windows directory junctions.
427
+ if (
428
+ stat.S_ISDIR(metadata.st_mode)
429
+ and not getattr(metadata, "st_reparse_tag", 0) & 0x20000000
430
+ ):
431
+ pending.append(path)
432
+ return sorted(paths)
433
+
434
+
435
+ def directory_content_digest(
436
+ target: Path, *, excluded: tuple[Path, ...] = (), include_ignored: bool = False
437
+ ) -> str:
418
438
  excluded_relative = []
419
439
  for path in excluded:
420
440
  try:
421
441
  excluded_relative.append(path.relative_to(target))
422
442
  except ValueError:
423
443
  continue
424
- paths = git_directory_snapshot_paths(target)
444
+ paths = (
445
+ source_directory_snapshot_paths(target)
446
+ if include_ignored
447
+ else git_directory_snapshot_paths(target)
448
+ )
425
449
  if paths is None:
426
450
  paths = sorted(target.rglob("*"))
427
451
  digest = hashlib.sha256()
@@ -440,7 +464,9 @@ def directory_content_digest(target: Path, *, excluded: tuple[Path, ...] = ()) -
440
464
  raw_path = os.fsencode(relative_path.as_posix())
441
465
  update_digest_field(digest, b"path", raw_path)
442
466
  update_digest_field(digest, b"mode", str(stat.S_IMODE(metadata.st_mode)).encode())
443
- if stat.S_ISLNK(metadata.st_mode):
467
+ if stat.S_ISLNK(metadata.st_mode) or (
468
+ include_ignored and getattr(metadata, "st_reparse_tag", 0) & 0x20000000
469
+ ):
444
470
  update_digest_field(digest, b"kind", b"symlink")
445
471
  update_digest_field(digest, b"content", os.fsencode(os.readlink(path)))
446
472
  elif stat.S_ISDIR(metadata.st_mode):
@@ -541,9 +567,7 @@ def copy_git_worktree_files(source: Path, destination: Path, excluded: tuple[Pat
541
567
  if nested_git_dir is None:
542
568
  raise SystemExit(f"Could not inspect nested Git working tree: {relative}")
543
569
  copy_git_worktree_files(source_path, destination_path, excluded)
544
- (destination_path / ".git").write_text(
545
- f"gitdir: {nested_git_dir}\n", encoding="utf-8"
546
- )
570
+ (destination_path / ".git").write_text(f"gitdir: {nested_git_dir}\n", encoding="utf-8")
547
571
  else:
548
572
  raise SystemExit(f"Unsupported Git working-tree file type: {relative}")
549
573
  copied_target = destination if pathspec == "." else destination / pathspec
@@ -58,11 +58,7 @@ def user_text(value: str | None) -> str | None:
58
58
 
59
59
 
60
60
  def user_context_argument(args: argparse.Namespace) -> str | None:
61
- value = (
62
- sys.stdin.read()
63
- if getattr(args, "user_context_stdin", False)
64
- else args.user_context
65
- )
61
+ value = sys.stdin.read() if getattr(args, "user_context_stdin", False) else args.user_context
66
62
  return user_text(value)
67
63
 
68
64
 
@@ -60,11 +60,7 @@ Return both a concise Markdown report and a JSON object conforming to [`../../sc
60
60
  7. top risk drivers, protective factors, and status-quo risk; and
61
61
  8. unknowns plus the bounded evidence plan when held.
62
62
 
63
- This skill lives at `<plugin-root>/skills/assess-patch-risk/SKILL.md`, so
64
- `<plugin-root>` is two directories up. Resolve `<python_command>` to the
65
- configured Python interpreter (`"$PYTHON"` in POSIX shells or
66
- `& "$env:PYTHON"` in PowerShell), otherwise use `python` on Windows and
67
- `python3` on Unix-like hosts.
63
+ This skill lives at `<plugin-root>/skills/assess-patch-risk/SKILL.md`, so `<plugin-root>` is two directories up. Resolve `<python_command>` to the configured Python interpreter (`"$PYTHON"` in POSIX shells or `& "$env:PYTHON"` in PowerShell), otherwise use `python` on Windows and `python3` on Unix-like hosts.
68
64
 
69
65
  Before returning the result, validate the JSON from any working directory with:
70
66
 
@@ -3,6 +3,7 @@
3
3
  Use this guidance after attack-path facts, reachability, and counterevidence are established.
4
4
 
5
5
  -- Considerations for severity / criticality re-rating --
6
+
6
7
  - For `high` and above, the impact must be materially security-relevant (for example: account takeover, auth bypass, meaningful privilege escalation, significant sensitive data exposure/exfiltration, credible RCE, or similarly severe compromise), not simply a bug or strange behavior
7
8
  - For a finding to remain `high` or `critical`, the exploitation path and impact should be clear enough that a professional security reviewer would not need a long speculative argument to justify it.
8
9
  - Do **not** treat ordinary code bugs as high/critical security issues just because they are bugs or because the scanner labeled them that way.
@@ -13,6 +14,7 @@ Use this guidance after attack-path facts, reachability, and counterevidence are
13
14
  - If it is actually provable that there is no bug at all (the description is entirely wrong or made up and you actually got that real proof that it is so), then label it as `ignore` for criticality to mark a false-positive.
14
15
 
15
16
  Non-exhaustive examples of vulnerabilities that often support `critical` when evidenced in code and context:
17
+
16
18
  - Credible RCE or arbitrary code execution (command injection, LFI exec, trivial memory corruption exploits, etc.). Requires actual proof that attacker input causes this from an in-scope attack surface.
17
19
  - Real XSS with meaningful proven impact (for example session/token theft, account compromise, privileged action execution, etc)
18
20
  - Account takeover or strong authentication bypass, especially if it is 0-click
@@ -27,6 +29,7 @@ Non-exhaustive examples of vulnerabilities that often support `critical` when ev
27
29
  - etc, other bugs not listed which follow this level of critical severity and impact; with actual proof that these bugs are reachable from in-scope attack-surface.
28
30
 
29
31
  Non-exhaustive examples of vulnerabilities that often support `high` when evidenced in code and context:
32
+
30
33
  - Server Side Request Forgery where there is actual proof that (1) an attacker can control the url being requested (bypassing protections around that) from in-scope attack-surface and (2) there are likely other local/lan/cloud services which can be reached to show actual impact. Be careful with reporting webhooks unless there is clear proof that it is dangerous, but do not treat a product-intended webhook/download/callback feature or optional operator allow/deny list as suppression evidence when attacker-controlled destinations can still reach internal, metadata, file-backed, redirect, or side-effecting targets.
31
34
  - Exploitable memory corruption with clear, major impact or ease of exploitation
32
35
  - Arbitrary file read that exposes less-sensitive user data or source code (if you have actual proof it reveals env secrets, then it is critical)
@@ -42,6 +45,7 @@ Non-exhaustive examples of vulnerabilities that often support `high` when eviden
42
45
  - Deserialization, SSTI, plugin abuse, macro / template abuse, or interpreter abuse where dangerous primitives are clearly reachable and impactful, but code execution or compromise is not fully proven to the standard needed for critical.
43
46
 
44
47
  Strong factors that often push a plausible `high` up to `critical`:
48
+
45
49
  - Unauthenticated or near-unauthenticated reachability from the internet or other broad in-scope surfaces.
46
50
  - 0-click or extremely low-friction exploitation.
47
51
  - Cross-tenant / cross-boundary impact rather than same-user or same-tenant impact.
@@ -50,6 +54,7 @@ Strong factors that often push a plausible `high` up to `critical`:
50
54
  - Clear proof of code execution, full account takeover, or crown-jewel secret access rather than only a plausible path.
51
55
 
52
56
  Examples that usually should not remain `high`/`critical` without very strong proof of it leading to the class of vulnerabilities above:
57
+
53
58
  - Generic correctness/reliability bugs
54
59
  - Strange edge cases with unclear attacker value
55
60
  - Low-impact information leaks
@@ -70,6 +75,7 @@ Examples that usually should not remain `high`/`critical` without very strong pr
70
75
  - Arbitrary file read limited to public files, low-sensitivity files, or source fragments with no realistic security consequence.
71
76
 
72
77
  High/Critical acceptance checklist (all should be true, unless the threat model strongly justifies an exception):
78
+
73
79
  - In-scope component
74
80
  - Realistic attacker
75
81
  - Reasonable in-scope attack surface
@@ -106,7 +112,6 @@ Final policy-adjustment guidance:
106
112
  - `none` does not increase likelihood based on exposure
107
113
  - Then decide reportability using the existing facts:
108
114
  - if repository evidence does not establish a realistic lower-privileged in-scope attacker path, set `ignore`
109
- - if the path is internal-only, developer-only, operator-only, localhost-only, privileged-local, or otherwise not meaningfully reportable in context, set `ignore`
110
115
 
111
116
  Do not suppress solely because the surface is private or internal when repository evidence still shows a meaningful authorization, trust-boundary, identity, or security-control regression in a real product or production-service workflow. In those cases, internal exposure should usually reduce likelihood or confidence rather than force `ignore`.
112
117
 
@@ -132,6 +132,8 @@ Treat failed requests, incomplete exact-identifier searches, unread plausible ma
132
132
 
133
133
  ### 4. Preview The Exact Writes
134
134
 
135
+ Follow the Writing Rules in `../../references/finding-detail-fields.md`. Explain the problem, how to reproduce it, the cause, the proposed fix, and validation. Put source locations and scan identifiers last.
136
+
135
137
  Present a compact review before any mutation. For every finding show:
136
138
 
137
139
  - finding id and fingerprint
package/dist/api.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  import { CodexLoginHandle, type AccountStatus } from "./auth.js";
3
3
  import { type CodexSecurityConfig, type JsonObject } from "./config.js";
4
4
  import { type ScanCost, type ScanSessionEvent } from "./cost.js";
5
+ import { type DeepScanProgress } from "./deep-progress.js";
5
6
  import { ScanResult } from "./result.js";
6
7
  import type { SeverityLevel } from "./models.js";
7
8
  import { type ScanActivity } from "./scan-activity.js";
@@ -16,6 +17,8 @@ export interface DeepScanOptions {
16
17
  maxTimeHours?: number;
17
18
  }
18
19
  export interface ScanOptions extends DeepScanOptions {
20
+ /** Opt into a durable scan -> custom publication -> dedupe workflow. */
21
+ workflowId?: string;
19
22
  auth?: ScanAuthMode;
20
23
  /** Stable, privacy-preserving end-user ID for this scan's model requests. */
21
24
  safetyIdentifier?: string;
@@ -41,6 +44,7 @@ export interface ScanOptions extends DeepScanOptions {
41
44
  onActivity?: (activity: ScanActivity) => void;
42
45
  onSessionEvent?: (event: ScanSessionEvent) => void;
43
46
  onProgress?: (progress: ScanProgress) => void;
47
+ onDeepProgress?: (progress: DeepScanProgress) => void;
44
48
  onWorkerStatus?: (status: ScanWorkerStatus) => void;
45
49
  onWarning?: (warning: string, details?: ScanWarningDetails) => void;
46
50
  onObserverError?: (observer: ScanObserverName, error: unknown) => void;
@@ -81,7 +85,7 @@ export interface ScanReconnectDetails {
81
85
  export interface ScanWarningDetails {
82
86
  kind: "target_changed";
83
87
  }
84
- type ScanObserverName = "onAuthentication" | "onCost" | "onOutputArchived" | "onOutputDirReady" | "onScanStarted" | "onTrustedAccessStatus" | "onReconnect" | "onActivity" | "onSessionEvent" | "onProgress" | "onWorkerStatus" | "onWarning";
88
+ type ScanObserverName = "onAuthentication" | "onCost" | "onOutputArchived" | "onOutputDirReady" | "onScanStarted" | "onTrustedAccessStatus" | "onReconnect" | "onActivity" | "onSessionEvent" | "onProgress" | "onDeepProgress" | "onWorkerStatus" | "onWarning";
85
89
  export interface ScanPreflight extends DeepScanOptions {
86
90
  repository: string;
87
91
  target: NormalizedTarget;
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";AA2BA,OAAO,EAEL,gBAAgB,EAGhB,KAAK,aAAa,EACnB,MAAM,WAAW,CAAC;AAMnB,OAAO,EAOL,KAAK,mBAAmB,EACxB,KAAK,UAAU,EAEhB,MAAM,aAAa,CAAC;AACrB,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACtB,MAAM,WAAW,CAAC;AA6Bn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