@yeison.restrepo.r/code-conductor 1.39.3 → 1.40.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeison.restrepo.r/code-conductor",
3
- "version": "1.39.3",
3
+ "version": "1.40.0",
4
4
  "description": "A governance layer for Claude Code sessions: hooks that check an agent's commands before they run, a spec-first workflow, and project memory the next session reads.",
5
5
  "keywords": [
6
6
  "agentic-development",
@@ -112,6 +112,31 @@ Construct `old_string` using the `old_string` construction rule. Use `Edit` to r
112
112
 
113
113
  Carry out the task described on that line.
114
114
 
115
+ ### Step 4.5: OWASP Security Scan (post-implement guardrail)
116
+
117
+ **Applies only when Step 4 wrote or edited code files** (`.js`, `.ts`, `.mjs`, `.cjs`, `.py`, `.java`, `.go`, `.rb`, `.php`, `.jsx`, `.tsx`, `.vue`, `.svelte`). Skip this step for markdown, config, documentation, or non-code changes.
118
+
119
+ After executing the task, review every code change you made in Step 4 against the OWASP Top 10. Scan the **diff only** (lines you added or modified), not the entire file:
120
+
121
+ | ID | Category | What to flag |
122
+ |----|----------|-------------|
123
+ | A01 | Broken Access Control | Missing auth/authz checks on new endpoints, CORS set to `*`, exposed admin routes without middleware |
124
+ | A02 | Cryptographic Failures | Hardcoded secrets/tokens/passwords/API keys, `MD5`/`SHA1` for password hashing, `http://` for sensitive data, encryption keys in source |
125
+ | A03 | Injection | String concatenation in SQL/NoSQL queries, unsanitized `eval()`, `exec()`, `Function()`, template literals in shell commands, raw user input in queries |
126
+ | A04 | Insecure Design | Missing input validation at system boundaries (user input, API params), no length/type checks on untrusted data |
127
+ | A05 | Security Misconfiguration | `debug: true` or `DEBUG=*` in production config, default credentials, stack traces exposed to client, verbose error messages with internal paths |
128
+ | A06 | Vulnerable Components | _(deferred — not scannable from diff)_ |
129
+ | A07 | Auth Failures | Session tokens in URLs or query strings, missing brute-force protection on login, weak password validation |
130
+ | A08 | Data Integrity | `dangerouslySetInnerHTML` without sanitization, `innerHTML` assignment from user input, `JSON.parse()` / deserialization of untrusted data without validation |
131
+ | A09 | Logging Failures | Secrets, tokens, or passwords in log statements, PII logged in plaintext |
132
+ | A10 | SSRF | User-controlled URLs passed directly to `fetch`/`axios`/`http.get` without allowlist validation |
133
+
134
+ **Behavior:**
135
+
136
+ - **Finding detected:** emit `[SECURITY] file:line — A0X: one-sentence description` for each finding. Fix all findings immediately, re-scan the fixed lines, and proceed to Step 5 only when the re-scan is clean.
137
+ - **Finding unresolved:** if a finding cannot be fixed without changing the task's scope, do not proceed. Take the Step 5 failure path (`[>]` → `[!]`), run Step 6, then halt with `SECURITY_FINDING_UNRESOLVED`, re-emitting each open `[SECURITY]` line. The halt escalates to human review: the loop stays stopped until the developer resolves the finding and resets the task to `[ ]`.
138
+ - **Clean:** silent — no output, proceed directly to Step 5.
139
+
115
140
  ### Step 5: Post-flip
116
141
 
117
142
  Construct `old_string` from the pre-flip line with `[ ]` replaced by `[>]` (the state after Step 3). Apply the `old_string` construction rule. Use `Edit` to replace:
@@ -154,6 +179,7 @@ After the hook: if the task state is `[!]`, halt with the failure report from St
154
179
  | Pre-flip Edit no-match >= 3 (same task) | Mark `[!]`, halt |
155
180
  | Post-flip Edit no-match | Halt; manual resolution |
156
181
  | Task execution failure | Mark `[>]` → `[!]`, halt |
182
+ | Unfixable OWASP finding (Step 4.5) | Mark `[>]` → `[!]`, halt; `SECURITY_FINDING_UNRESOLVED`; report open `[SECURITY]` lines |
157
183
  | Hook write failure | Log warning, continue |
158
184
  | `[>]` prerequisite | Halt; `PREREQUISITE_IN_PROGRESS`; report task ID |
159
185
  | `DEPENDENCY_FAILED` | Halt; report failed prerequisite |
@@ -87,6 +87,7 @@ After modifying any method, variable, class, or component:
87
87
  | [TESTS] | Omitted in MIN mode — test files affected or written |
88
88
  | [BUG] | Always when a bug is found — format: `file:line — one-sentence description`. Never suppressed, including in MIN mode. |
89
89
  | [VALIDATION] | After implementation tasks only — edge cases, risks, justification |
90
+ | [SECURITY] | Always when OWASP finding detected — format: `file:line — A0X: description`. Never suppressed; an unfixable finding halts with `SECURITY_FINDING_UNRESOLVED` |
90
91
 
91
92
  ## Verbosity Protocol
92
93
  VERBOSITY: MIN (default)
@@ -94,6 +95,7 @@ VERBOSITY: MIN (default)
94
95
  - [CHANGES] tag: modified file list only.
95
96
  - [VALIDATION] tag: included after implementation tasks only (code changes, file rewrites, behavioral modifications); condensed to exactly three lines — one each for: edge cases covered, residual risks, justification. Omitted entirely for non-implementation tasks (file deletions, config-only chores, maintenance commits, pure documentation edits).
96
97
  - [BUG] tag: always included in MIN mode when a bug is found; format: `[BUG] file:line — one-sentence description`. Never suppressed.
98
+ - [SECURITY] tag: always included in MIN mode when an OWASP finding is detected; format: `[SECURITY] file:line — A0X: one-sentence description`. Never suppressed.
97
99
  - All other tags ([REASON], [PLAN], [DEPS], [TESTS]) are omitted in MIN mode.
98
100
  - Ambiguity: one clarifying question, nothing else.
99
101