trace-to-skill 0.1.66 → 0.1.68
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.
- package/README.md +13 -6
- package/dist/src/cli.js +11 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/configAudit.d.ts +7 -1
- package/dist/src/configAudit.js +114 -4
- package/dist/src/configAudit.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/sensitiveAudit.d.ts +25 -0
- package/dist/src/sensitiveAudit.js +197 -0
- package/dist/src/sensitiveAudit.js.map +1 -0
- package/docs/CODEX_ISSUE_MAP.md +5 -3
- package/docs/DISCOVERY.md +6 -2
- package/docs/FAILURE_TAXONOMY.md +1 -1
- package/docs/OPENAI_OSS_BRIEF.md +2 -2
- package/docs/USE_CASES.md +24 -7
- package/llms.txt +5 -2
- package/package.json +12 -3
- package/schemas/config-audit-result.schema.json +23 -3
- package/schemas/sensitive-audit-result.schema.json +97 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { lstat, readdir } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
const SKIPPED_DIRS = new Set([
|
|
4
|
+
".git",
|
|
5
|
+
"node_modules",
|
|
6
|
+
"dist",
|
|
7
|
+
"build",
|
|
8
|
+
".next",
|
|
9
|
+
".turbo",
|
|
10
|
+
".cache",
|
|
11
|
+
"DerivedData"
|
|
12
|
+
]);
|
|
13
|
+
const SENSITIVE_PATTERNS = [
|
|
14
|
+
{
|
|
15
|
+
kind: "env_file",
|
|
16
|
+
severity: "critical",
|
|
17
|
+
reason: "environment files commonly contain API keys, database URLs, tokens, or local secrets.",
|
|
18
|
+
suggestedExclude: "**/.env*",
|
|
19
|
+
matches: (_relativePath, basename) => basename === ".env" || basename.startsWith(".env.")
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
kind: "package_auth_config",
|
|
23
|
+
severity: "critical",
|
|
24
|
+
reason: "package manager auth config can contain registry tokens or publish credentials.",
|
|
25
|
+
suggestedExclude: "**/.npmrc",
|
|
26
|
+
matches: (_relativePath, basename) => basename === ".npmrc" || basename === ".pypirc"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
kind: "cloud_credentials",
|
|
30
|
+
severity: "critical",
|
|
31
|
+
reason: "cloud credential files can grant access to infrastructure, storage, or production services.",
|
|
32
|
+
suggestedExclude: "**/.aws/**",
|
|
33
|
+
matches: (relativePath) => pathSegments(relativePath).includes(".aws")
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
kind: "ssh_credentials",
|
|
37
|
+
severity: "critical",
|
|
38
|
+
reason: "SSH private keys and SSH config should not enter agent context.",
|
|
39
|
+
suggestedExclude: "**/.ssh/**",
|
|
40
|
+
matches: (relativePath, basename) => pathSegments(relativePath).includes(".ssh") ||
|
|
41
|
+
/^(id_rsa|id_dsa|id_ecdsa|id_ed25519)(\..*)?$/.test(basename)
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
kind: "kubernetes_credentials",
|
|
45
|
+
severity: "critical",
|
|
46
|
+
reason: "Kubernetes config can contain cluster credentials and access tokens.",
|
|
47
|
+
suggestedExclude: "**/.kube/**",
|
|
48
|
+
matches: (relativePath) => pathSegments(relativePath).includes(".kube")
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
kind: "docker_credentials",
|
|
52
|
+
severity: "critical",
|
|
53
|
+
reason: "Docker config can contain registry credentials or auth helpers.",
|
|
54
|
+
suggestedExclude: "**/.docker/**",
|
|
55
|
+
matches: (relativePath) => pathSegments(relativePath).includes(".docker")
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
kind: "private_key_or_certificate",
|
|
59
|
+
severity: "critical",
|
|
60
|
+
reason: "private key and certificate bundles are high-risk credential material.",
|
|
61
|
+
suggestedExclude: "**/*.{pem,key,p12}",
|
|
62
|
+
matches: (_relativePath, basename) => /\.(pem|key|p12)$/i.test(basename)
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
kind: "mobile_signing_secret",
|
|
66
|
+
severity: "high",
|
|
67
|
+
reason: "mobile signing profiles and certificates can expose release or device signing material.",
|
|
68
|
+
suggestedExclude: "**/*.{mobileprovision,provisionprofile}",
|
|
69
|
+
matches: (_relativePath, basename) => /\.(mobileprovision|provisionprofile)$/i.test(basename)
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
kind: "database_file",
|
|
73
|
+
severity: "high",
|
|
74
|
+
reason: "local databases can contain customer data, user data, cached tokens, or private app state.",
|
|
75
|
+
suggestedExclude: "**/*.{sqlite,sqlite3,db}",
|
|
76
|
+
matches: (_relativePath, basename) => /\.(sqlite|sqlite3|db)$/i.test(basename)
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
kind: "secret_manifest",
|
|
80
|
+
severity: "high",
|
|
81
|
+
reason: "secret manifests and production config files often carry deploy credentials or private endpoints.",
|
|
82
|
+
suggestedExclude: "**/*secret*",
|
|
83
|
+
matches: (_relativePath, basename) => /(^|[-_.])(secret|secrets|credential|credentials)([-_.]|$)/i.test(basename) ||
|
|
84
|
+
/^production\.(json|ya?ml|toml|env)$/i.test(basename)
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
export async function auditSensitivePaths(root = process.cwd()) {
|
|
88
|
+
const resolvedRoot = path.resolve(root);
|
|
89
|
+
const findings = [];
|
|
90
|
+
const stats = { scannedEntries: 0 };
|
|
91
|
+
await scanDirectory(resolvedRoot, resolvedRoot, findings, stats);
|
|
92
|
+
const recommendedExcludes = uniqueSorted(findings.map((finding) => finding.suggestedExclude));
|
|
93
|
+
const criticalFindings = findings.filter((finding) => finding.severity === "critical").length;
|
|
94
|
+
return {
|
|
95
|
+
generatedAt: new Date().toISOString(),
|
|
96
|
+
root: resolvedRoot,
|
|
97
|
+
status: criticalFindings > 0 ? "fail" : findings.length > 0 ? "warn" : "pass",
|
|
98
|
+
summary: {
|
|
99
|
+
scannedEntries: stats.scannedEntries,
|
|
100
|
+
sensitiveFindings: findings.length,
|
|
101
|
+
criticalFindings,
|
|
102
|
+
recommendedExcludes: recommendedExcludes.length
|
|
103
|
+
},
|
|
104
|
+
findings: findings.sort((a, b) => a.path.localeCompare(b.path)),
|
|
105
|
+
recommendedExcludes
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export function renderSensitiveAuditMarkdown(result) {
|
|
109
|
+
const lines = [
|
|
110
|
+
"# trace-to-skill Sensitive Path Audit",
|
|
111
|
+
"",
|
|
112
|
+
`Status: **${result.status}**`,
|
|
113
|
+
"",
|
|
114
|
+
`Root: \`${result.root}\``,
|
|
115
|
+
`Scanned entries: ${result.summary.scannedEntries}`,
|
|
116
|
+
`Sensitive findings: ${result.summary.sensitiveFindings}`,
|
|
117
|
+
`Critical findings: ${result.summary.criticalFindings}`,
|
|
118
|
+
"",
|
|
119
|
+
"This audit is filename/path based and does not read file contents or follow symlink targets.",
|
|
120
|
+
"",
|
|
121
|
+
"## Findings",
|
|
122
|
+
""
|
|
123
|
+
];
|
|
124
|
+
if (result.findings.length === 0) {
|
|
125
|
+
lines.push("No sensitive path findings detected.", "");
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
for (const finding of result.findings) {
|
|
129
|
+
lines.push(`- **${finding.severity}** ${finding.kind}: \`${finding.path}\``, ` - ${finding.reason}`, ` - Suggested exclude: \`${finding.suggestedExclude}\``);
|
|
130
|
+
}
|
|
131
|
+
lines.push("");
|
|
132
|
+
}
|
|
133
|
+
lines.push("## Recommended Excludes", "");
|
|
134
|
+
if (result.recommendedExcludes.length === 0) {
|
|
135
|
+
lines.push("No exclude patterns suggested.", "");
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
lines.push("```gitignore", ...result.recommendedExcludes, "```", "");
|
|
139
|
+
}
|
|
140
|
+
lines.push("Suggested next step:", "", "- Add these patterns to the exclusion mechanism your agent surface supports, and keep OS sandbox or permission profiles enabled for hard enforcement.", "- Treat this report as a preflight checklist; it is not a replacement for a sandbox boundary.", "");
|
|
141
|
+
return lines.join("\n");
|
|
142
|
+
}
|
|
143
|
+
async function scanDirectory(root, dir, findings, stats) {
|
|
144
|
+
let entries;
|
|
145
|
+
try {
|
|
146
|
+
entries = await readdir(dir, { withFileTypes: true });
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
for (const entry of entries) {
|
|
152
|
+
if (entry.isDirectory() && SKIPPED_DIRS.has(entry.name)) {
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
const absolutePath = path.join(dir, entry.name);
|
|
156
|
+
const relativePath = normalizeRelative(path.relative(root, absolutePath));
|
|
157
|
+
stats.scannedEntries += 1;
|
|
158
|
+
let entryStats;
|
|
159
|
+
try {
|
|
160
|
+
entryStats = await lstat(absolutePath);
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
const matched = firstSensitiveMatch(relativePath, entry.name);
|
|
166
|
+
if (matched) {
|
|
167
|
+
findings.push({
|
|
168
|
+
severity: entryStats.isSymbolicLink() ? "critical" : matched.severity,
|
|
169
|
+
kind: entryStats.isSymbolicLink() ? "sensitive_symlink" : matched.kind,
|
|
170
|
+
path: relativePath,
|
|
171
|
+
reason: entryStats.isSymbolicLink()
|
|
172
|
+
? `sensitive-looking symlink path matched ${matched.kind}; symlink targets are not followed by this audit.`
|
|
173
|
+
: matched.reason,
|
|
174
|
+
suggestedExclude: matched.suggestedExclude
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
if (matched && entryStats.isDirectory()) {
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
if (entryStats.isDirectory()) {
|
|
181
|
+
await scanDirectory(root, absolutePath, findings, stats);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
function firstSensitiveMatch(relativePath, basename) {
|
|
186
|
+
return SENSITIVE_PATTERNS.find((pattern) => pattern.matches(relativePath, basename));
|
|
187
|
+
}
|
|
188
|
+
function pathSegments(relativePath) {
|
|
189
|
+
return relativePath.split("/");
|
|
190
|
+
}
|
|
191
|
+
function normalizeRelative(relativePath) {
|
|
192
|
+
return relativePath.split(path.sep).join("/");
|
|
193
|
+
}
|
|
194
|
+
function uniqueSorted(values) {
|
|
195
|
+
return [...new Set(values)].sort((a, b) => a.localeCompare(b));
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=sensitiveAudit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sensitiveAudit.js","sourceRoot":"","sources":["../../src/sensitiveAudit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,IAAI,MAAM,WAAW,CAAC;AAgD7B,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,MAAM;IACN,cAAc;IACd,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,aAAa;CACd,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAuB;IAC7C;QACE,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,uFAAuF;QAC/F,gBAAgB,EAAE,UAAU;QAC5B,OAAO,EAAE,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,MAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;KAC1F;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,iFAAiF;QACzF,gBAAgB,EAAE,WAAW;QAC7B,OAAO,EAAE,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,SAAS;KACtF;IACD;QACE,IAAI,EAAE,mBAAmB;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AO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;AACvF,CAAC;AAED,SAAS,YAAY,CAAC,YAAoB;IACxC,OAAO,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,iBAAiB,CAAC,YAAoB;IAC7C,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,YAAY,CAAC,MAAgB;IACpC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC"}
|
package/docs/CODEX_ISSUE_MAP.md
CHANGED
|
@@ -13,6 +13,7 @@ npx trace-to-skill codex-report redacted-runs --output openai-codex-issue.md
|
|
|
13
13
|
npx trace-to-skill usage-evidence ./usage-notes.md --output usage-evidence.md
|
|
14
14
|
npx trace-to-skill plugin-audit ~/.codex --app /Applications/Codex.app --format json
|
|
15
15
|
npx trace-to-skill diagnostics-bundle ~/.codex --output codex-diagnostics
|
|
16
|
+
npx trace-to-skill sensitive-audit . --format json
|
|
16
17
|
```
|
|
17
18
|
|
|
18
19
|
## Issue Clusters
|
|
@@ -34,11 +35,11 @@ npx trace-to-skill diagnostics-bundle ~/.codex --output codex-diagnostics
|
|
|
34
35
|
| Terminal output and scrollback integrity failures | scrollback lines disappear, streaming output overwrites older visible transcript, complete numbered lines are missing, `missing_count`, `tmux_scrollback_repro.sh`, viewport snaps to bottom, transcript mode cannot recover output | `codex_terminal_output_integrity` | `trace-to-skill codex-report ./runs` or `trace-to-skill demo terminal-output-integrity` |
|
|
35
36
|
| Subagent lifecycle and state reconciliation failures | completed/closed subagents remain visible, stale `thread_spawn_edges`, `agent thread limit reached`, `close_agent` hangs or returns `not_found`, child threads crowd recent conversations, compaction loses prior subagent IDs, forked review inherits parent context | `codex_subagent_lifecycle` | `trace-to-skill codex-report ./runs` or `trace-to-skill demo subagent-lifecycle` |
|
|
36
37
|
| Approval persistence and MCP approval friction | `Approve for this session` is not remembered, command approval cache misses, repeated file-change approvals, `approval_policy = "never"` still prompts for MCP tools, per-tool approval configs explode | `codex_approval_friction` | `trace-to-skill codex-report ./runs` |
|
|
37
|
-
| Config and Preferences drift | legacy `profile` / `[profiles.*]`, `configVersionConflict`, Preferences `Unable to save`, stale model pin, missing `default_permissions` profile, enabled plugin cache missing, Windows elevated sandbox mode | `sandbox_permission`, `codex_plugin_runtime`, `codex_approval_friction` | `trace-to-skill config-audit ~/.codex --format json` |
|
|
38
|
+
| Config and Preferences drift | legacy `profile` / `[profiles.*]`, `configVersionConflict`, Preferences `Unable to save`, stale model pin, Speed/Fast resets to Standard despite persisted `service_tier`, missing `default_permissions` profile, enabled plugin cache missing, Windows elevated sandbox mode | `sandbox_permission`, `codex_plugin_runtime`, `codex_approval_friction` | `trace-to-skill config-audit ~/.codex --format json` |
|
|
38
39
|
| Bundled plugin cache and marketplace drift | Computer Use unavailable, Browser/Chrome plugin unavailable, generated runtime marketplace omits bundled plugins, missing `.mcp.json` or `plugin.json`, helper app not installed, `CODEX_HOME` points at another runtime | `codex_plugin_runtime`, `codex_mcp_runtime` | `trace-to-skill plugin-audit ~/.codex --app /Applications/Codex.app --format json` |
|
|
39
40
|
| Support diagnostics packaging | maintainers ask for more detail, but raw `config.toml`, `logs_2.sqlite`, `state_5.sqlite`, `session_index.jsonl`, rollout JSONL, or local logs are too private to post | multiple | `trace-to-skill diagnostics-bundle ~/.codex --output codex-diagnostics` |
|
|
40
41
|
| Quota mismatch | `/status` or usage page shows quota left, but runtime says `You've hit your usage limit`; account/workspace reset or cache confusion | `quota_mismatch` | `trace-to-skill usage-evidence ./usage-notes.md` or `trace-to-skill codex-report ./runs` |
|
|
41
|
-
| Sensitive file exclusion | `.env`, private keys, `.npmrc`, cloud credentials, local databases, or
|
|
42
|
+
| Sensitive file exclusion | teams need deterministic `.agentignore` / `.aiexclude` / `.codexignore` candidates before agent runs, or traces show `.env`, private keys, `.npmrc`, cloud credentials, local databases, signing files, or secret manifests entering context | `sensitive_file_access` plus sensitive path metadata | `trace-to-skill sensitive-audit . --format json` before runs, `trace-to-skill codex-report ./runs` after incidents |
|
|
42
43
|
| Context compaction failures | `Error running remote compact task`, `context_length_exceeded`, compaction loops, `responses/compact` stream disconnects | `context_compaction` | `trace-to-skill analyze ./runs` |
|
|
43
44
|
| Latest-turn drift | Codex answers an older prompt, repeats a previous response, redoes an already fixed task, forgets recent edits after compaction, or leaks raw tool payload text | `codex_latest_turn_drift` | `trace-to-skill codex-report ./runs` |
|
|
44
45
|
| Session resume and state failures | `codex resume` picker freezes, large rollout JSONL, short `session_index.jsonl`, `Could not load archived chats`, `state_5.sqlite`, `thread_goals` | `codex_session_state` | `trace-to-skill codex-report ./runs` or `trace-to-skill session-audit ~/.codex --format json` |
|
|
@@ -73,13 +74,14 @@ npx trace-to-skill diagnostics-bundle ~/.codex --output codex-diagnostics
|
|
|
73
74
|
- Include terminal emulator/version, shell, WSL/SSH/tmux/Zellij state, streaming state, exact scroll action, viewport snap behavior, first missing or duplicated line id, raw log/transcript proof, terminal capture, numbered-line harness/control output, terminal dimensions/scrollback settings, and `/resume` or transcript recovery behavior for terminal-output integrity reports.
|
|
74
75
|
- Include root thread id, subagent ids/nicknames/roles, spawn/close/list commands, `close_agent` results, `list_agents` or `/agents` output, `thread_spawn_edges` status counts, `agents.max_threads` or registry quota evidence, recent-list/sidebar behavior, child-thread archive/top-level status, last-progress or halt reason, MCP server state for subagents, compaction/resume timing, redacted UI evidence, restart/reload behavior, and whether stale agents are UI-only or still block spawns for subagent-lifecycle reports.
|
|
75
76
|
- Include selected approval scope, displayed vs executed command, MCP server/tool names, visible args, repeated prompt count, and config snippets for approval-friction reports.
|
|
76
|
-
- Include `config-audit` output for Preferences/config, sandbox, model-pin, MCP approval, and plugin-cache reports.
|
|
77
|
+
- Include `config-audit` output for Preferences/config, Speed/Fast persistence, sandbox, model-pin, MCP approval, and plugin-cache reports.
|
|
77
78
|
- Include `plugin-audit` output, plugin name/version, cache path, helper path, manifest path, runtime marketplace, app-bundle marketplace, native pipe env vars, settings/plugin-list errors, and restart behavior for plugin runtime failures.
|
|
78
79
|
- Include app version, OS, screenshot or screen recording, menu/shortcut used, workspace attachment state, file-tree icon visibility, floating-panel refresh behavior, file preview extension, and persisted panel-state keys for file-tree UI failures.
|
|
79
80
|
- Include the latest user request, stale earlier prompt/response, compaction timing, context size, and feedback/thread id for latest-turn drift.
|
|
80
81
|
- Include line-linked evidence rather than screenshots alone when logs are available.
|
|
81
82
|
- Redact tokens, API keys, emails, local home paths, customer data, and hidden Unicode before posting publicly.
|
|
82
83
|
- For sensitive-file reports, attach only redacted excerpts and the file path/class, not the original credential material.
|
|
84
|
+
- For preflight exclusion reports, attach `sensitive-audit` output and recommended exclude globs; it does not read file contents or follow symlink targets.
|
|
83
85
|
|
|
84
86
|
## Related OpenAI/Codex Threads Used For Fixtures
|
|
85
87
|
|
package/docs/DISCOVERY.md
CHANGED
|
@@ -31,7 +31,7 @@ This page is written for maintainers, search engines, package indexes, and AI re
|
|
|
31
31
|
- Codex terminal output or scrollback becomes unreliable because streamed lines disappear, get overwritten, truncate, duplicate, misalign, snap to the bottom, or only survive in logs/transcripts.
|
|
32
32
|
- Codex subagents become hard to trust because completed or closed agents remain visible, stale spawn edges stay open, child threads crowd the recent list, spawn quota is exhausted, or compaction loses prior subagent IDs.
|
|
33
33
|
- Codex approval flow repeatedly prompts after `Approve for this session`, forgets a safe approval scope, or forces large trusted MCP servers into noisy per-tool approval configs.
|
|
34
|
-
- Codex config drift makes Preferences unable to save, keeps legacy `profile` / `[profiles.*]` config after migration, pins an unavailable model, points `default_permissions` at a missing profile, enables Windows elevated sandbox mode, or references plugin cache entries that are missing on disk.
|
|
34
|
+
- Codex config drift makes Preferences unable to save, keeps legacy `profile` / `[profiles.*]` config after migration, pins an unavailable model, resets Speed/Fast to Standard despite persisted `service_tier`, points `default_permissions` at a missing profile, enables Windows elevated sandbox mode, or references plugin cache entries that are missing on disk.
|
|
35
35
|
- Codex Desktop file tree, folder icon, floating file panel, or built-in file preview disappears, goes stale, or cannot be revealed by `View > Toggle File Tree`.
|
|
36
36
|
- Codex resume, Desktop history rendering, archived chats, context compression, or local state migrations fail after large JSONL histories, images, tool output, stale SQLite state, short `session_index.jsonl`, or project/thread metadata drift.
|
|
37
37
|
- Codex model or runtime latency regresses so GPT-5.5 Fast feels like Standard, simple tasks take 10-20+ minutes, thinking stalls, or search/read/compaction phases dominate the session.
|
|
@@ -46,6 +46,7 @@ This page is written for maintainers, search engines, package indexes, and AI re
|
|
|
46
46
|
- Codex Desktop, app-server, VS Code extension, renderer, GPU, shell snapshot, or helper processes leak local resources or keep burning CPU/GPU/RAM after the useful work should be idle.
|
|
47
47
|
- Codex reports `You've hit your usage limit` even though `/status` or the usage dashboard shows quota left, or quota appears shared across accounts.
|
|
48
48
|
- A Codex or agent trace reads, attaches, diffs, uploads, or indexes sensitive files such as `.env`, private keys, package auth files, cloud credentials, local databases, or production secret manifests.
|
|
49
|
+
- A maintainer wants a filename/path-only preflight report for `.env`, private keys, package auth files, cloud credentials, local databases, signing files, and secret manifests before starting an AI agent.
|
|
49
50
|
- A repository has conflicting `AGENTS.md`, `CLAUDE.md`, Cursor, Copilot, or Gemini instructions.
|
|
50
51
|
- A monorepo has nested `AGENTS.md` files, `@file.md` instruction includes, or invalid instruction-file encoding that makes Codex load the wrong policy.
|
|
51
52
|
- A workflow wants to feed GitHub issue, PR, comment, discussion, check-run, or commit text into an agent but needs prompt-injection checks first.
|
|
@@ -77,6 +78,7 @@ npx trace-to-skill scorecard .
|
|
|
77
78
|
npx trace-to-skill lint-agents .
|
|
78
79
|
npx trace-to-skill guard-github-event "$GITHUB_EVENT_PATH"
|
|
79
80
|
npx trace-to-skill session-audit ~/.codex --format json
|
|
81
|
+
npx trace-to-skill sensitive-audit . --format json
|
|
80
82
|
npx trace-to-skill config-audit ~/.codex --format json
|
|
81
83
|
npx trace-to-skill plugin-audit ~/.codex --app /Applications/Codex.app --format json
|
|
82
84
|
npx trace-to-skill diagnostics-bundle ~/.codex --output codex-diagnostics
|
|
@@ -94,6 +96,7 @@ npx trace-to-skill suggest ./runs --target agents-md
|
|
|
94
96
|
- `trace-to-skill doctor --format json`
|
|
95
97
|
- `trace-to-skill demo --format json`
|
|
96
98
|
- `trace-to-skill redact --format json`
|
|
99
|
+
- `trace-to-skill sensitive-audit --format json`
|
|
97
100
|
- `trace-to-skill scorecard --format json`
|
|
98
101
|
- `trace-to-skill session-audit --format json`
|
|
99
102
|
- `trace-to-skill config-audit --format json`
|
|
@@ -113,6 +116,7 @@ npx trace-to-skill suggest ./runs --target agents-md
|
|
|
113
116
|
- `schemas/agents-lint-result.schema.json`
|
|
114
117
|
- `schemas/doctor-result.schema.json`
|
|
115
118
|
- `schemas/redact-result.schema.json`
|
|
119
|
+
- `schemas/sensitive-audit-result.schema.json`
|
|
116
120
|
- `schemas/scorecard-result.schema.json`
|
|
117
121
|
- `schemas/oss-brief-result.schema.json`
|
|
118
122
|
- `schemas/patch-guard-result.schema.json`
|
|
@@ -124,7 +128,7 @@ npx trace-to-skill suggest ./runs --target agents-md
|
|
|
124
128
|
|
|
125
129
|
## Related Keywords
|
|
126
130
|
|
|
127
|
-
Codex, OpenAI Codex, Codex issue report, OpenAI triage, Codex diagnostics bundle, privacy-preserving support bundle, Codex plugin audit, Computer Use unavailable, Codex Browser plugin unavailable, bundled marketplace mismatch, generated runtime marketplace, plugin manifest missing, CODEX_HOME mismatch, Codex CLI, Codex sandbox, Windows sandbox, Codex config audit, Codex config.toml, Codex Preferences unable to save, configVersionConflict, default_permissions missing profile, Codex Windows helper path, Codex WindowsApps, Codex rg Access Denied, Codex ripgrep, CodexSandboxUsers, LocalCache Local OpenAI Codex bin, node_repl spawn setup refresh, Codex approval friction, Approve for this session, Allow for this session, approval_policy never, MCP approval prompts, default_tools_approval_mode, Playwright MCP approvals, Chrome DevTools MCP approvals, Codex auth, token_exchange_failed, Codex connectivity, stream disconnected, Codex connector auth cache, Codex Apps stale link, codex_apps_tools, codex_app_directory, Reauthentication required, refresh token revoked, isAccessible false, link_ connector, Codex deeplink, Codex OAuth callback, codex://oauth_callback, Unable to find Electron app, Error launching app, type=click&tag, AppUserModelID, DelegateExecute, codex app path, Codex remote compact, responses/compact, /compact timeout, tcp_user_timeout, stream_idle_timeout_ms, Codex remote control, Codex mobile, Waiting for desktop, Directory Unavailable, stale listener, Codex terminal output, Codex scrollback, Codex terminal history, terminal output integrity, missing_count, missing_examples, tmux_scrollback_repro.sh, line_truncation_repro.md, Windows Terminal scrollback, transcript mode, Codex subagent lifecycle, stale subagents, close_agent, thread_spawn_edges, agent thread limit reached, agents.max_threads, list_agents, /agents, subagent child threads, fork_context, unbiased review, subagent recent conversations, Codex MCP runtime, MCP unsupported call, mcp__node_repl__js, MCP namespace serverName, MCP Transport closed, StdioServerTransport, Codex plugin runtime, Computer Use native pipe path unavailable, SKY_CUA_NATIVE_PIPE_DIRECTORY, Plugin loading failed, plugin/list unknown variant vertical, Codex Browser plugin, Codex Computer Use, Codex Chrome plugin, stale plugin cache, codex plugin add, Codex file tree, Toggle File Tree, missing folder icon, floating file panel stale, file preview fails, workspace navigation, Codex latest-turn drift, Codex replies to earlier messages, stale prompt response, ignoring latest message, previous prompt, auto compaction forgets edits, raw tool payload leak, write_stdin session_id, Codex latency regression, GPT-5.5 Fast slow, Codex too slow, thinking stalls, Codex thinking hang, Codex stuck thinking, Codex Working stuck, no streamed follow-up, first response_item delayed, responses_http time.idle, model_client.stream_responses_api, turn/start, task_started, Codex Copy as Markdown missing, Codex Pasted text.txt, Codex long pasted prompt attachment, Codex clipboard export, Codex paste as text, Codex generated attachment preview edit, Codex goal ignores attachment, pasted-text-attachments.json, fileAttachments promptRaw composer.getText, pre-first-token latency, search/read latency, runtime scheduling latency, Codex resume, Codex session audit, Codex history audit, Codex session index, session_index.jsonl, Codex session state, rollout JSONL, logs_2.sqlite, codex-tui.log, sandbox.log, thread_goals, state_5.sqlite, goals_1.sqlite, archived chats, Codex token burn, Codex usage evidence, Codex rate-limit evidence, Codex usage drain, Codex usage reset, Codex weekly reset drift, reset_at changed, deterministic reset, rate limit reset, write_stdin polling, cached input tokens, compaction tax, background process polling, Codex resource leak, Codex performance, high CPU, high GPU, shell-snapshot, Code Helper Renderer, Codex tool-call integrity, apply_patch, apply_patch Add File overwrite, patch guard, guard-patch, Add File symlink, tool_call_id, failed revert changes, patch safety, Codex quota, usage limit, rate limits, sensitive files, Codex privacy, .env, private keys, credential files, AGENTS.md, SKILL.md, Claude Code, Cursor, Copilot coding agent, Gemini CLI, MCP, Model Context Protocol, prompt injection, agent evals, AI code review, open-source maintainers, trace redaction, SARIF, GitHub Actions.
|
|
131
|
+
Codex, OpenAI Codex, Codex issue report, OpenAI triage, Codex diagnostics bundle, privacy-preserving support bundle, sensitive path audit, sensitive-audit, agentignore, .agentignore, codexignore, .codexignore, aiexclude, .aiexclude, exclude sensitive files, Codex plugin audit, Computer Use unavailable, Codex Browser plugin unavailable, bundled marketplace mismatch, generated runtime marketplace, plugin manifest missing, CODEX_HOME mismatch, Codex CLI, Codex sandbox, Windows sandbox, Codex config audit, Codex config.toml, Codex global state, .codex-global-state.json, Codex Speed reset, Codex Fast resets to Standard, service_tier fast, default-service-tier priority, has-user-changed-service-tier, Codex Preferences unable to save, configVersionConflict, default_permissions missing profile, Codex Windows helper path, Codex WindowsApps, Codex rg Access Denied, Codex ripgrep, CodexSandboxUsers, LocalCache Local OpenAI Codex bin, node_repl spawn setup refresh, Codex approval friction, Approve for this session, Allow for this session, approval_policy never, MCP approval prompts, default_tools_approval_mode, Playwright MCP approvals, Chrome DevTools MCP approvals, Codex auth, token_exchange_failed, Codex connectivity, stream disconnected, Codex connector auth cache, Codex Apps stale link, codex_apps_tools, codex_app_directory, Reauthentication required, refresh token revoked, isAccessible false, link_ connector, Codex deeplink, Codex OAuth callback, codex://oauth_callback, Unable to find Electron app, Error launching app, type=click&tag, AppUserModelID, DelegateExecute, codex app path, Codex remote compact, responses/compact, /compact timeout, tcp_user_timeout, stream_idle_timeout_ms, Codex remote control, Codex mobile, Waiting for desktop, Directory Unavailable, stale listener, Codex terminal output, Codex scrollback, Codex terminal history, terminal output integrity, missing_count, missing_examples, tmux_scrollback_repro.sh, line_truncation_repro.md, Windows Terminal scrollback, transcript mode, Codex subagent lifecycle, stale subagents, close_agent, thread_spawn_edges, agent thread limit reached, agents.max_threads, list_agents, /agents, subagent child threads, fork_context, unbiased review, subagent recent conversations, Codex MCP runtime, MCP unsupported call, mcp__node_repl__js, MCP namespace serverName, MCP Transport closed, StdioServerTransport, Codex plugin runtime, Computer Use native pipe path unavailable, SKY_CUA_NATIVE_PIPE_DIRECTORY, Plugin loading failed, plugin/list unknown variant vertical, Codex Browser plugin, Codex Computer Use, Codex Chrome plugin, stale plugin cache, codex plugin add, Codex file tree, Toggle File Tree, missing folder icon, floating file panel stale, file preview fails, workspace navigation, Codex latest-turn drift, Codex replies to earlier messages, stale prompt response, ignoring latest message, previous prompt, auto compaction forgets edits, raw tool payload leak, write_stdin session_id, Codex latency regression, GPT-5.5 Fast slow, Codex too slow, thinking stalls, Codex thinking hang, Codex stuck thinking, Codex Working stuck, no streamed follow-up, first response_item delayed, responses_http time.idle, model_client.stream_responses_api, turn/start, task_started, Codex Copy as Markdown missing, Codex Pasted text.txt, Codex long pasted prompt attachment, Codex clipboard export, Codex paste as text, Codex generated attachment preview edit, Codex goal ignores attachment, pasted-text-attachments.json, fileAttachments promptRaw composer.getText, pre-first-token latency, search/read latency, runtime scheduling latency, Codex resume, Codex session audit, Codex history audit, Codex session index, session_index.jsonl, Codex session state, rollout JSONL, logs_2.sqlite, codex-tui.log, sandbox.log, thread_goals, state_5.sqlite, goals_1.sqlite, archived chats, Codex token burn, Codex usage evidence, Codex rate-limit evidence, Codex usage drain, Codex usage reset, Codex weekly reset drift, reset_at changed, deterministic reset, rate limit reset, write_stdin polling, cached input tokens, compaction tax, background process polling, Codex resource leak, Codex performance, high CPU, high GPU, shell-snapshot, Code Helper Renderer, Codex tool-call integrity, apply_patch, apply_patch Add File overwrite, patch guard, guard-patch, Add File symlink, tool_call_id, failed revert changes, patch safety, Codex quota, usage limit, rate limits, sensitive files, Codex privacy, .env, private keys, credential files, AGENTS.md, SKILL.md, Claude Code, Cursor, Copilot coding agent, Gemini CLI, MCP, Model Context Protocol, prompt injection, agent evals, AI code review, open-source maintainers, trace redaction, SARIF, GitHub Actions.
|
|
128
132
|
|
|
129
133
|
## Non-Goals
|
|
130
134
|
|
package/docs/FAILURE_TAXONOMY.md
CHANGED
|
@@ -225,4 +225,4 @@ The fix is to treat those surfaces as data unless the instruction is also presen
|
|
|
225
225
|
|
|
226
226
|
MCP server configuration or tool usage appears without an explicit trust boundary, capability inventory, or approval policy.
|
|
227
227
|
|
|
228
|
-
`trace-to-skill` also parses common `mcpServers` JSON shapes and project `.codex/config.toml` MCP sections, then reports capability hints such as filesystem, shell, browser, network, database, container, and secret-bearing environment variables. `lint-agents` checks static startup inputs too: command availability, missing `cwd`, placeholder env values, unresolved `$VARS`, unresolved plugin placeholders, local stdio commands without explicit `cwd`, and JSON `mcp_servers` / `mcpServers` casing drift. It also flags Codex config drift such as deprecated `codex_hooks`, missing `default_permissions` profile definitions,
|
|
228
|
+
`trace-to-skill` also parses common `mcpServers` JSON shapes and project `.codex/config.toml` MCP sections, then reports capability hints such as filesystem, shell, browser, network, database, container, and secret-bearing environment variables. `lint-agents` checks static startup inputs too: command availability, missing `cwd`, placeholder env values, unresolved `$VARS`, unresolved plugin placeholders, local stdio commands without explicit `cwd`, and JSON `mcp_servers` / `mcpServers` casing drift. It also flags Codex config drift such as deprecated `codex_hooks`, missing `default_permissions` profile definitions, synced `projects.* trusted_level` metadata, and Speed/Fast persistence drift between `config.toml` and `.codex-global-state.json`.
|
package/docs/OPENAI_OSS_BRIEF.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
| Field | Value |
|
|
4
4
|
| --- | --- |
|
|
5
5
|
| Repository | https://github.com/grnbtqdbyx-create/trace-to-skill |
|
|
6
|
-
| Package | trace-to-skill@0.1.
|
|
6
|
+
| Package | trace-to-skill@0.1.68 |
|
|
7
7
|
| License | Apache-2.0 |
|
|
8
8
|
| Codex readiness | ready (100/100) |
|
|
9
9
|
| Benchmark | pass, 33 cases |
|
|
@@ -27,7 +27,7 @@ API credits would power optional maintainer workflows on top of the local determ
|
|
|
27
27
|
## Evidence
|
|
28
28
|
|
|
29
29
|
- Public repository: https://github.com/grnbtqdbyx-create/trace-to-skill
|
|
30
|
-
- One-command package: npx trace-to-skill@0.1.
|
|
30
|
+
- One-command package: npx trace-to-skill@0.1.68
|
|
31
31
|
- Open-source license: Apache-2.0
|
|
32
32
|
- Codex readiness doctor: ready, 100/100, 0 failed checks.
|
|
33
33
|
- Public fixture benchmark: pass, 33 cases.
|
package/docs/USE_CASES.md
CHANGED
|
@@ -20,6 +20,7 @@ npx trace-to-skill demo connector-auth-cache
|
|
|
20
20
|
npx trace-to-skill demo mcp-discovery-mismatch
|
|
21
21
|
npx trace-to-skill demo terminal-output-integrity
|
|
22
22
|
npx trace-to-skill demo subagent-lifecycle
|
|
23
|
+
npx trace-to-skill sensitive-audit .
|
|
23
24
|
```
|
|
24
25
|
|
|
25
26
|
What it proves:
|
|
@@ -27,6 +28,7 @@ What it proves:
|
|
|
27
28
|
- packaged fixtures can produce a real Codex issue report immediately
|
|
28
29
|
- maintainers can inspect the output shape before sharing any private log
|
|
29
30
|
- demos cover remote compact failures, Windows helper path failures, patch overwrite safety, approval friction, latency, Thinking hangs, clipboard/attachment regressions, deeplink/OAuth launch regressions, connector auth-cache regressions, MCP discovery/config-scope mismatches, terminal output/scrollback integrity, subagent lifecycle drift, token burn, sensitive files, and prompt injection
|
|
31
|
+
- `sensitive-audit` scans filenames and paths before an agent run, without reading file contents, so teams can build `.agentignore`, `.aiexclude`, `.codexignore`, or sandbox permission profiles from a concrete repo report
|
|
30
32
|
|
|
31
33
|
See the generated demo output in [docs/DEMO.md](DEMO.md).
|
|
32
34
|
|
|
@@ -49,7 +51,7 @@ What it proves:
|
|
|
49
51
|
Recommended CI surface:
|
|
50
52
|
|
|
51
53
|
```yaml
|
|
52
|
-
- uses: grnbtqdbyx-create/trace-to-skill@v0.1.
|
|
54
|
+
- uses: grnbtqdbyx-create/trace-to-skill@v0.1.68
|
|
53
55
|
with:
|
|
54
56
|
mode: all
|
|
55
57
|
doctor-threshold: "85"
|
|
@@ -92,7 +94,9 @@ npx trace-to-skill diagnostics-bundle ~/.codex --output codex-diagnostics
|
|
|
92
94
|
|
|
93
95
|
This catches signals such as Windows sandbox setup refresh failures, `os error 740`, `CodexSandboxOffline` ownership drift, ACL denial, approval-policy mismatch, and Full Access sessions behaving like workspace-write or on-request mode.
|
|
94
96
|
|
|
95
|
-
`config-audit` is local and read-only: it summarizes legacy `profile` / `[profiles.*]` config, model pins, `sandbox_mode`, `approval_policy`, `[windows].sandbox`, missing `default_permissions` profiles, deprecated `codex_hooks`, machine-local project trust entries, enabled plugins with missing cache directories, and large per-tool MCP approval configs.
|
|
97
|
+
`config-audit` is local and read-only: it summarizes legacy `profile` / `[profiles.*]` config, model pins, Speed/Fast persistence drift between `config.toml` and `.codex-global-state.json`, `sandbox_mode`, `approval_policy`, `[windows].sandbox`, missing `default_permissions` profiles, deprecated `codex_hooks`, machine-local project trust entries, enabled plugins with missing cache directories, and large per-tool MCP approval configs.
|
|
98
|
+
|
|
99
|
+
For Codex App reports where Speed resets from Fast to Standard after restart, include the `service_tier`, `config default-service-tier`, `global default-service-tier`, `global has-user-changed-service-tier`, and `service_tier_persistence_drift` fields instead of pasting the raw state file.
|
|
96
100
|
|
|
97
101
|
`plugin-audit` is local and read-only: it summarizes configured bundled plugins, cache directories, plugin manifests, generated runtime marketplaces, optional app-bundle marketplaces, Computer Use helper-app install state, `CODEX_HOME` mismatch, and unsupported feature flags.
|
|
98
102
|
|
|
@@ -348,7 +352,20 @@ For a public demo report:
|
|
|
348
352
|
npx trace-to-skill demo patch-overwrite
|
|
349
353
|
```
|
|
350
354
|
|
|
351
|
-
## 25.
|
|
355
|
+
## 25. Sensitive Path Preflight Before Agent Runs
|
|
356
|
+
|
|
357
|
+
Use this before giving an AI coding agent a repository.
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
npx trace-to-skill sensitive-audit . --format json
|
|
361
|
+
npx trace-to-skill sensitive-audit . --output sensitive-paths.md
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
This finds sensitive-looking paths such as `.env`, `.env.*`, `.npmrc`, `.pypirc`, `.aws/**`, `.ssh/**`, `.kube/**`, `.docker/**`, private keys, certificates, local databases, mobile signing files, and secret manifests without reading file contents or following symlink targets.
|
|
365
|
+
|
|
366
|
+
The output includes a stable JSON schema plus recommended exclude globs that can seed `.agentignore`, `.aiexclude`, `.codexignore`, local sandbox permission profiles, or team security review checklists. It is a preflight report, not a sandbox boundary.
|
|
367
|
+
|
|
368
|
+
## 26. OpenAI Codex Issue Report
|
|
352
369
|
|
|
353
370
|
Use this when you want to file or update an OpenAI/Codex issue with a concise, evidence-backed report instead of pasting a full transcript.
|
|
354
371
|
|
|
@@ -361,7 +378,7 @@ The report includes the likely Codex failure class, line-linked evidence, diagno
|
|
|
361
378
|
|
|
362
379
|
For a cluster-to-command map of current Codex issue patterns, see [CODEX_ISSUE_MAP.md](CODEX_ISSUE_MAP.md).
|
|
363
380
|
|
|
364
|
-
##
|
|
381
|
+
## 27. Sensitive File Access Evidence
|
|
365
382
|
|
|
366
383
|
Use this when a trace suggests an agent read, attached, uploaded, diffed, or indexed credential-bearing files.
|
|
367
384
|
|
|
@@ -374,7 +391,7 @@ This catches signals such as `.env`, `.env.production`, `.npmrc`, `.pypirc`, `.n
|
|
|
374
391
|
|
|
375
392
|
Before publishing evidence, run `trace-to-skill redact` and attach only redacted excerpts plus the file path/class.
|
|
376
393
|
|
|
377
|
-
##
|
|
394
|
+
## 28. GitHub Context Guard
|
|
378
395
|
|
|
379
396
|
Use this before an agent reads untrusted GitHub text.
|
|
380
397
|
|
|
@@ -391,7 +408,7 @@ Use it when:
|
|
|
391
408
|
- a bot asks Codex to triage untrusted user reports
|
|
392
409
|
- logs or comments might contain instructions like "ignore previous instructions" or "print secrets"
|
|
393
410
|
|
|
394
|
-
##
|
|
411
|
+
## 29. Failed Agent Run To Reviewable Rule
|
|
395
412
|
|
|
396
413
|
Use this when a coding agent made a repeated workflow mistake.
|
|
397
414
|
|
|
@@ -409,7 +426,7 @@ Recommended maintainer loop:
|
|
|
409
426
|
4. Copy only evidence-backed rules into the real policy file.
|
|
410
427
|
5. Run `eval` or `scorecard` in CI so the same failure does not silently return.
|
|
411
428
|
|
|
412
|
-
##
|
|
429
|
+
## 30. Privacy-Preserving Adoption
|
|
413
430
|
|
|
414
431
|
Use this when you want public evidence without leaking private traces.
|
|
415
432
|
|
package/llms.txt
CHANGED
|
@@ -19,7 +19,7 @@ Runtime: Node.js 20+
|
|
|
19
19
|
- Codex Windows helper path failures such as bundled `rg.exe`, `node_repl.exe`, Browser, Chrome, or Computer Use helpers resolving through blocked WindowsApps/MSIX package paths, missing `%LOCALAPPDATA%\OpenAI\Codex\bin`, broken LocalCache helper bins, `CodexSandboxUsers` ACL gaps, EFS/copyfile failures, and `missing-helper-path`
|
|
20
20
|
- Codex patch safety failures such as `apply_patch` accepting `*** Add File` for an existing path, misleading `A <path>` summaries, symlink target replacement, and missing preflight checks before generated patches touch the workspace
|
|
21
21
|
- Codex sandbox and permission failures such as setup refresh errors, `os error 740`, `CodexSandboxOffline` ownership drift, ACL denial, and approval-mode downgrades
|
|
22
|
-
- Codex config drift such as Preferences `Unable to save`, `configVersionConflict`, legacy `profile` / `[profiles.*]` config, stale model pins, missing permission profiles, Windows elevated sandbox mode, plugin cache drift, and MCP approval sprawl
|
|
22
|
+
- Codex config drift such as Preferences `Unable to save`, `configVersionConflict`, legacy `profile` / `[profiles.*]` config, Speed/Fast persistence drift between `config.toml` and `.codex-global-state.json`, stale model pins, missing permission profiles, Windows elevated sandbox mode, plugin cache drift, and MCP approval sprawl
|
|
23
23
|
- Codex auth and connectivity failures such as `token_exchange_failed`, `auth.openai.com/oauth/token`, missing `ca-certificates`, proxy or MITM TLS behavior, IPv6 fallback problems, Cloudflare challenge responses, and ChatGPT stream disconnects
|
|
24
24
|
- Codex mobile and remote-control route health failures such as `Waiting for desktop`, `Directory Unavailable`, stale listeners on `127.0.0.1:14567`, stale `server_name` enrollment, empty backend environments, and incomplete helper bundles
|
|
25
25
|
- Codex MCP runtime failures such as cancelled non-interactive approvals, `request_user_input is not supported in exec mode`, dropped namespace or `serverName` metadata, `unsupported call: mcp__...__...`, and closed `StdioServerTransport` sessions
|
|
@@ -38,6 +38,7 @@ Runtime: Node.js 20+
|
|
|
38
38
|
- Codex resource leaks and runaway local processes such as high CPU/GPU, `Code Helper`, `Codex Helper Renderer`, orphaned shell snapshots, log floods, thinking animation GPU loops, and non-Git workspace CPU loops
|
|
39
39
|
- Codex quota and usage-limit mismatches where `/status` or the usage page shows remaining quota, accounts share limits unexpectedly, or 5h and weekly quotas move together
|
|
40
40
|
- sensitive-file access in traces, including `.env`, private keys, package auth files, cloud credentials, local databases, and production secret manifests entering agent context
|
|
41
|
+
- sensitive path preflight before agent runs via `sensitive-audit`, with filename/path-only detection and recommended excludes for `.agentignore`, `.aiexclude`, `.codexignore`, or sandbox profiles
|
|
41
42
|
- hallucinated files and broad over-editing
|
|
42
43
|
- conflicting `AGENTS.md`, `CLAUDE.md`, Cursor, Copilot, or Gemini instructions
|
|
43
44
|
- stale path references, missing `@file.md` includes, nested `AGENTS.md` visibility gaps, invalid UTF-8, and oversized instruction files that can make Codex follow wrong or truncated guidance
|
|
@@ -87,6 +88,7 @@ npx trace-to-skill plugin-audit ~/.codex --app /Applications/Codex.app --format
|
|
|
87
88
|
npx trace-to-skill diagnostics-bundle ~/.codex --output codex-diagnostics
|
|
88
89
|
npx trace-to-skill usage-evidence ./usage-notes.md --output usage-evidence.md
|
|
89
90
|
npx trace-to-skill redact ./runs --output redacted-runs
|
|
91
|
+
npx trace-to-skill sensitive-audit . --format json
|
|
90
92
|
npx trace-to-skill analyze ./runs
|
|
91
93
|
npx trace-to-skill codex-report ./runs --output openai-codex-issue.md
|
|
92
94
|
npx trace-to-skill suggest ./runs --target agents-md
|
|
@@ -99,7 +101,7 @@ npx trace-to-skill init --comment --sarif
|
|
|
99
101
|
## GitHub Action
|
|
100
102
|
|
|
101
103
|
```yaml
|
|
102
|
-
- uses: grnbtqdbyx-create/trace-to-skill@v0.1.
|
|
104
|
+
- uses: grnbtqdbyx-create/trace-to-skill@v0.1.68
|
|
103
105
|
with:
|
|
104
106
|
mode: all
|
|
105
107
|
doctor-threshold: "85"
|
|
@@ -115,6 +117,7 @@ npx trace-to-skill init --comment --sarif
|
|
|
115
117
|
- AGENTS.md linter JSON schema: https://github.com/grnbtqdbyx-create/trace-to-skill/blob/main/schemas/agents-lint-result.schema.json
|
|
116
118
|
- Doctor JSON schema: https://github.com/grnbtqdbyx-create/trace-to-skill/blob/main/schemas/doctor-result.schema.json
|
|
117
119
|
- Redaction JSON schema: https://github.com/grnbtqdbyx-create/trace-to-skill/blob/main/schemas/redact-result.schema.json
|
|
120
|
+
- Sensitive path audit JSON schema: https://github.com/grnbtqdbyx-create/trace-to-skill/blob/main/schemas/sensitive-audit-result.schema.json
|
|
118
121
|
- Scorecard JSON schema: https://github.com/grnbtqdbyx-create/trace-to-skill/blob/main/schemas/scorecard-result.schema.json
|
|
119
122
|
- Patch guard JSON schema: https://github.com/grnbtqdbyx-create/trace-to-skill/blob/main/schemas/patch-guard-result.schema.json
|
|
120
123
|
- Config audit JSON schema: https://github.com/grnbtqdbyx-create/trace-to-skill/blob/main/schemas/config-audit-result.schema.json
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trace-to-skill",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.68",
|
|
4
4
|
"description": "Turn failed AI coding-agent runs into reusable AGENTS.md rules, SKILL.md files, and eval evidence.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"build": "tsc -p tsconfig.json",
|
|
42
42
|
"clean": "rm -rf dist coverage",
|
|
43
43
|
"test": "npm run build && node --test dist/tests/*.test.js",
|
|
44
|
-
"check": "npm run test && node dist/src/cli.js doctor . --format json > /tmp/trace-to-skill-doctor.json && node dist/src/cli.js lint-agents . --format json > /tmp/trace-to-skill-agents-lint.json && node dist/src/cli.js analyze fixtures --format json > /tmp/trace-to-skill-smoke.json && node dist/src/cli.js usage-evidence fixtures --format json > /tmp/trace-to-skill-usage-evidence.json && node dist/src/cli.js suggest fixtures --target agents-md > /tmp/trace-to-skill-suggest.md && node dist/src/cli.js demo --format json > /tmp/trace-to-skill-demo.json && node dist/src/cli.js benchmark --format json > /tmp/trace-to-skill-benchmark.json && node dist/src/cli.js scorecard . --format json > /tmp/trace-to-skill-scorecard.json && node dist/src/cli.js oss-brief . --format json > /tmp/trace-to-skill-oss-brief.json",
|
|
44
|
+
"check": "npm run test && node dist/src/cli.js doctor . --format json > /tmp/trace-to-skill-doctor.json && node dist/src/cli.js lint-agents . --format json > /tmp/trace-to-skill-agents-lint.json && node dist/src/cli.js analyze fixtures --format json > /tmp/trace-to-skill-smoke.json && node dist/src/cli.js usage-evidence fixtures --format json > /tmp/trace-to-skill-usage-evidence.json && node dist/src/cli.js sensitive-audit . --format json > /tmp/trace-to-skill-sensitive-audit.json && node dist/src/cli.js suggest fixtures --target agents-md > /tmp/trace-to-skill-suggest.md && node dist/src/cli.js demo --format json > /tmp/trace-to-skill-demo.json && node dist/src/cli.js benchmark --format json > /tmp/trace-to-skill-benchmark.json && node dist/src/cli.js scorecard . --format json > /tmp/trace-to-skill-scorecard.json && node dist/src/cli.js oss-brief . --format json > /tmp/trace-to-skill-oss-brief.json",
|
|
45
45
|
"prepack": "npm run build",
|
|
46
46
|
"prepare": "npm run build"
|
|
47
47
|
},
|
|
@@ -106,6 +106,9 @@
|
|
|
106
106
|
"codex-terminal",
|
|
107
107
|
"codex-scrollback",
|
|
108
108
|
"terminal-output",
|
|
109
|
+
"codex-speed",
|
|
110
|
+
"codex-service-tier",
|
|
111
|
+
"codex-config-persistence",
|
|
109
112
|
"codex-subagent",
|
|
110
113
|
"codex-subagents",
|
|
111
114
|
"subagent-lifecycle",
|
|
@@ -148,7 +151,13 @@
|
|
|
148
151
|
"evals",
|
|
149
152
|
"open-source-maintainers",
|
|
150
153
|
"self-improvement",
|
|
151
|
-
"trace-redaction"
|
|
154
|
+
"trace-redaction",
|
|
155
|
+
"agentignore",
|
|
156
|
+
"codexignore",
|
|
157
|
+
"aiexclude",
|
|
158
|
+
"sensitive-audit",
|
|
159
|
+
"agent-privacy",
|
|
160
|
+
"context-privacy"
|
|
152
161
|
],
|
|
153
162
|
"author": "Ogün <https://github.com/grnbtqdbyx-create>",
|
|
154
163
|
"license": "Apache-2.0",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "trace-to-skill Codex config audit result",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
-
"required": ["generatedAt", "target", "configPath", "status", "summary", "values", "findings"],
|
|
7
|
+
"required": ["generatedAt", "target", "configPath", "globalStatePath", "status", "summary", "values", "findings"],
|
|
8
8
|
"properties": {
|
|
9
9
|
"generatedAt": {
|
|
10
10
|
"type": "string",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"configPath": {
|
|
17
17
|
"type": "string"
|
|
18
18
|
},
|
|
19
|
+
"globalStatePath": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
19
22
|
"status": {
|
|
20
23
|
"type": "string",
|
|
21
24
|
"enum": ["pass", "warn", "fail"]
|
|
@@ -37,11 +40,14 @@
|
|
|
37
40
|
"summary": {
|
|
38
41
|
"type": "object",
|
|
39
42
|
"additionalProperties": false,
|
|
40
|
-
"required": ["exists", "sizeBytes", "topLevelKeys", "sections", "mcpServers", "pluginSections"],
|
|
43
|
+
"required": ["exists", "globalStateExists", "sizeBytes", "topLevelKeys", "sections", "mcpServers", "pluginSections"],
|
|
41
44
|
"properties": {
|
|
42
45
|
"exists": {
|
|
43
46
|
"type": "boolean"
|
|
44
47
|
},
|
|
48
|
+
"globalStateExists": {
|
|
49
|
+
"type": "boolean"
|
|
50
|
+
},
|
|
45
51
|
"sizeBytes": {
|
|
46
52
|
"type": "integer",
|
|
47
53
|
"minimum": 0
|
|
@@ -86,6 +92,18 @@
|
|
|
86
92
|
},
|
|
87
93
|
"defaultPermissions": {
|
|
88
94
|
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"serviceTier": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"configDefaultServiceTier": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"globalDefaultServiceTier": {
|
|
103
|
+
"type": ["string", "null"]
|
|
104
|
+
},
|
|
105
|
+
"globalHasUserChangedServiceTier": {
|
|
106
|
+
"type": "boolean"
|
|
89
107
|
}
|
|
90
108
|
}
|
|
91
109
|
},
|
|
@@ -110,7 +128,9 @@
|
|
|
110
128
|
"deprecated_codex_hooks",
|
|
111
129
|
"machine_local_project_state",
|
|
112
130
|
"plugin_cache_missing",
|
|
113
|
-
"mcp_approval_sprawl"
|
|
131
|
+
"mcp_approval_sprawl",
|
|
132
|
+
"global_state_unreadable",
|
|
133
|
+
"service_tier_persistence_drift"
|
|
114
134
|
]
|
|
115
135
|
},
|
|
116
136
|
"line": {
|