bigpowers 2.86.0 → 2.86.2
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/.agents/skills/diagnose-root/SKILL.md +1 -1
- package/.agents/skills/migrate-spec/SKILL.md +3 -3
- package/.agents/skills/plan-work/SKILL.md +1 -1
- package/.agents/skills/security-review/SKILL.md +3 -1
- package/.agents/skills/smoke-test/SKILL.md +1 -1
- package/.agents/skills/trace-requirement/SKILL.md +1 -1
- package/.codebuddy/skills/diagnose-root/SKILL.md +1 -1
- package/.codebuddy/skills/migrate-spec/SKILL.md +3 -3
- package/.codebuddy/skills/plan-work/SKILL.md +1 -1
- package/.codebuddy/skills/security-review/SKILL.md +3 -1
- package/.codebuddy/skills/smoke-test/SKILL.md +1 -1
- package/.codebuddy/skills/trace-requirement/SKILL.md +1 -1
- package/.codex/skills/diagnose-root/SKILL.md +1 -1
- package/.codex/skills/migrate-spec/SKILL.md +3 -3
- package/.codex/skills/plan-work/SKILL.md +1 -1
- package/.codex/skills/security-review/SKILL.md +3 -1
- package/.codex/skills/smoke-test/SKILL.md +1 -1
- package/.codex/skills/trace-requirement/SKILL.md +1 -1
- package/.hermes/skills/diagnose-root/SKILL.md +1 -1
- package/.hermes/skills/migrate-spec/SKILL.md +3 -3
- package/.hermes/skills/plan-work/SKILL.md +1 -1
- package/.hermes/skills/security-review/SKILL.md +3 -1
- package/.hermes/skills/smoke-test/SKILL.md +1 -1
- package/.hermes/skills/trace-requirement/SKILL.md +1 -1
- package/.kilocode/rules/diagnose-root.md +1 -1
- package/.kilocode/rules/migrate-spec.md +3 -3
- package/.kilocode/rules/plan-work.md +1 -1
- package/.kilocode/rules/security-review.md +3 -1
- package/.kilocode/rules/smoke-test.md +1 -1
- package/.kilocode/rules/trace-requirement.md +1 -1
- package/.mimocode/skills/diagnose-root/SKILL.md +1 -1
- package/.mimocode/skills/migrate-spec/SKILL.md +3 -3
- package/.mimocode/skills/plan-work/SKILL.md +1 -1
- package/.mimocode/skills/security-review/SKILL.md +3 -1
- package/.mimocode/skills/smoke-test/SKILL.md +1 -1
- package/.mimocode/skills/trace-requirement/SKILL.md +1 -1
- package/.pi/package.json +1 -1
- package/.pi/prompts/diagnose-root.md +1 -1
- package/.pi/prompts/migrate-spec.md +3 -3
- package/.pi/prompts/plan-work.md +1 -1
- package/.pi/prompts/security-review.md +3 -1
- package/.pi/prompts/smoke-test.md +1 -1
- package/.pi/prompts/trace-requirement.md +1 -1
- package/.pi/skills/diagnose-root/SKILL.md +1 -1
- package/.pi/skills/migrate-spec/SKILL.md +3 -3
- package/.pi/skills/plan-work/SKILL.md +1 -1
- package/.pi/skills/security-review/SKILL.md +3 -1
- package/.pi/skills/smoke-test/SKILL.md +1 -1
- package/.pi/skills/trace-requirement/SKILL.md +1 -1
- package/.trae/skills/diagnose-root/SKILL.md +1 -1
- package/.trae/skills/migrate-spec/SKILL.md +3 -3
- package/.trae/skills/plan-work/SKILL.md +1 -1
- package/.trae/skills/security-review/SKILL.md +3 -1
- package/.trae/skills/smoke-test/SKILL.md +1 -1
- package/.trae/skills/trace-requirement/SKILL.md +1 -1
- package/.windsurf/rules/diagnose-root.md +1 -1
- package/.windsurf/rules/migrate-spec.md +3 -3
- package/.windsurf/rules/plan-work.md +1 -1
- package/.windsurf/rules/security-review.md +3 -1
- package/.windsurf/rules/smoke-test.md +1 -1
- package/.windsurf/rules/trace-requirement.md +1 -1
- package/.zcode/skills/diagnose-root/SKILL.md +1 -1
- package/.zcode/skills/migrate-spec/SKILL.md +3 -3
- package/.zcode/skills/plan-work/SKILL.md +1 -1
- package/.zcode/skills/security-review/SKILL.md +3 -1
- package/.zcode/skills/smoke-test/SKILL.md +1 -1
- package/.zcode/skills/trace-requirement/SKILL.md +1 -1
- package/CHANGELOG.md +15 -0
- package/package.json +1 -1
- package/scripts/lib/__pycache__/link_utils.cpython-312.pyc +0 -0
- package/scripts/lib/__pycache__/srp_engine_links.cpython-312.pyc +0 -0
- package/scripts/run-skill-verify.sh +97 -10
- package/scripts/verify-cwe-fixture-sync.sh +88 -0
- package/skills/diagnose-root/SKILL.md +1 -1
- package/skills/migrate-spec/SKILL.md +3 -3
- package/skills/plan-work/SKILL.md +1 -1
- package/skills/security-review/SKILL.md +3 -1
- package/skills/security-review/fixtures/CWE-639-idor-negative.go +48 -0
- package/skills/security-review/fixtures/CWE-639-idor-positive.go +29 -0
- package/skills/smoke-test/SKILL.md +1 -1
- package/skills/trace-requirement/SKILL.md +1 -1
- package/skills-lock.json +6 -6
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// story: e80s05
|
|
2
|
+
// Negative fixture: correctly scoped tenant query (must NOT be flagged).
|
|
3
|
+
//
|
|
4
|
+
// The org comes from the authenticated context, never from the request, and it
|
|
5
|
+
// is part of the WHERE clause. A caller from another organization gets zero
|
|
6
|
+
// rows rather than someone else's site.
|
|
7
|
+
//
|
|
8
|
+
// Note the retrofit trap this deliberately avoids: bigbase's BUG-2026-07-24T184443
|
|
9
|
+
// added `org_id INTEGER NOT NULL DEFAULT 0`, which passed tests on new rows and
|
|
10
|
+
// hid 8 of 9 production sites whose legacy rows defaulted to org 0. Scope on a
|
|
11
|
+
// real, backfilled org_id — never a placeholder default.
|
|
12
|
+
package fixtures
|
|
13
|
+
|
|
14
|
+
import (
|
|
15
|
+
"database/sql"
|
|
16
|
+
"net/http"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
func orgIDFromContext(r *http.Request) (string, bool) {
|
|
20
|
+
v, ok := r.Context().Value(ctxOrgID).(string)
|
|
21
|
+
return v, ok && v != ""
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type ctxKey string
|
|
25
|
+
|
|
26
|
+
const ctxOrgID ctxKey = "org_id"
|
|
27
|
+
|
|
28
|
+
func handleGetSiteNegative(w http.ResponseWriter, r *http.Request, db *sql.DB) {
|
|
29
|
+
orgID, ok := orgIDFromContext(r)
|
|
30
|
+
if !ok {
|
|
31
|
+
http.Error(w, "forbidden", http.StatusForbidden)
|
|
32
|
+
return
|
|
33
|
+
}
|
|
34
|
+
siteID := r.URL.Query().Get("site_id")
|
|
35
|
+
|
|
36
|
+
// SAFE: the tenant predicate is not optional and does not come from input.
|
|
37
|
+
row := db.QueryRow(
|
|
38
|
+
`SELECT id, name, domain FROM sites WHERE id = ? AND org_id = ?`,
|
|
39
|
+
siteID, orgID,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
var id, name, domain string
|
|
43
|
+
if err := row.Scan(&id, &name, &domain); err != nil {
|
|
44
|
+
http.Error(w, "not found", http.StatusNotFound)
|
|
45
|
+
return
|
|
46
|
+
}
|
|
47
|
+
_, _ = w.Write([]byte(name + " " + domain))
|
|
48
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// story: e80s05
|
|
2
|
+
// Positive fixture: IDOR / missing tenant scoping (must be flagged).
|
|
3
|
+
//
|
|
4
|
+
// Modelled on the bigbase family (BUG-129/130/133/135/136/140/143): the
|
|
5
|
+
// handler authenticates the caller, then trusts an ID from the request and
|
|
6
|
+
// queries by that ID alone. Authentication is proven; authorization is not.
|
|
7
|
+
// Nothing in the type system or a diff-scoped review makes this look wrong —
|
|
8
|
+
// the bug is a predicate that was never written.
|
|
9
|
+
package fixtures
|
|
10
|
+
|
|
11
|
+
import (
|
|
12
|
+
"database/sql"
|
|
13
|
+
"net/http"
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
func handleGetSitePositive(w http.ResponseWriter, r *http.Request, db *sql.DB) {
|
|
17
|
+
siteID := r.URL.Query().Get("site_id")
|
|
18
|
+
|
|
19
|
+
// VULNERABLE: scoped by primary key only. Any authenticated caller from any
|
|
20
|
+
// organization can read any site by guessing or enumerating site_id.
|
|
21
|
+
row := db.QueryRow(`SELECT id, name, domain FROM sites WHERE id = ?`, siteID)
|
|
22
|
+
|
|
23
|
+
var id, name, domain string
|
|
24
|
+
if err := row.Scan(&id, &name, &domain); err != nil {
|
|
25
|
+
http.Error(w, "not found", http.StatusNotFound)
|
|
26
|
+
return
|
|
27
|
+
}
|
|
28
|
+
_, _ = w.Write([]byte(name + " " + domain))
|
|
29
|
+
}
|
|
@@ -81,4 +81,4 @@ Part of **★ VERIFY ★**: `verify-work` → `validate-contracts` → `smoke-te
|
|
|
81
81
|
|
|
82
82
|
## Verify
|
|
83
83
|
|
|
84
|
-
→ verify: `test -x scripts/run-smoke.sh && grep -q 'run-smoke.sh' skills/smoke-test/SKILL.md && grep -
|
|
84
|
+
→ verify: `test -x scripts/run-smoke.sh && grep -q 'run-smoke.sh' skills/smoke-test/SKILL.md && ! grep -q 'See \[REFERENCE.md\](REFERENCE.md)$' skills/smoke-test/SKILL.md && echo OK`
|
|
@@ -33,7 +33,7 @@ Look for `// story: X.Y` or `# story: X.Y` comments in source files and tests:
|
|
|
33
33
|
grep -rn "story: " . --include="*.ts" --include="*.js" --include="*.py" --include="*.sh" | grep -v node_modules
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
→ verify: `grep -
|
|
36
|
+
→ verify: `[ "$(grep -rl "story: " . --include="*.ts" --include="*.sh" --include="*.py" 2>/dev/null | wc -l | tr -d " ")" -gt 0 ]`
|
|
37
37
|
|
|
38
38
|
### 3. Build the matrix
|
|
39
39
|
|
package/skills-lock.json
CHANGED
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"diagnose-root": {
|
|
90
90
|
"description": "Run 4-phase root cause analysis — reproduce, isolate, hypothesize, verify. Use when a bug is confirmed but root cause is unclear, after investigate-bug, or when user mentions root cause analysis.",
|
|
91
|
-
"sha256": "
|
|
91
|
+
"sha256": "29ae28bdaf599530",
|
|
92
92
|
"path": "skills/diagnose-rootSKILL.md"
|
|
93
93
|
},
|
|
94
94
|
"diagnose-stall": {
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
},
|
|
204
204
|
"migrate-spec": {
|
|
205
205
|
"description": "Detect GSD, spec-kit, or BMAD spec artifacts and transform them into bigpowers YAML layout (state.yaml, release-plan.yaml, epics/, requirements/, plans/, ADRs). Use when migrating foreign spec docs.",
|
|
206
|
-
"sha256": "
|
|
206
|
+
"sha256": "7eff81666ba5b9c0",
|
|
207
207
|
"path": "skills/migrate-specSKILL.md"
|
|
208
208
|
},
|
|
209
209
|
"model-domain": {
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
},
|
|
239
239
|
"plan-work": {
|
|
240
240
|
"description": "\"PLANNING SPINE STEP 3 of 3 — Plan the work: write detailed implementation tasks into the active epic capsule (specs/epics/eNN-slug/). Produces countable-story-format .md specs and runnable -tasks.yaml files. Use after slice-tasks (step 2). Not a substitute for scope-work (step 1) or slice-tasks (step 2).\"",
|
|
241
|
-
"sha256": "
|
|
241
|
+
"sha256": "e5d751ca5e928e2d",
|
|
242
242
|
"path": "skills/plan-workSKILL.md"
|
|
243
243
|
},
|
|
244
244
|
"publish-package": {
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
},
|
|
304
304
|
"security-review": {
|
|
305
305
|
"description": ">",
|
|
306
|
-
"sha256": "
|
|
306
|
+
"sha256": "3d046f443689fc1e",
|
|
307
307
|
"path": "skills/security-reviewSKILL.md"
|
|
308
308
|
},
|
|
309
309
|
"seed-conventions": {
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
},
|
|
334
334
|
"smoke-test": {
|
|
335
335
|
"description": "\"Post-deploy health-check against a live URL. Validates HTTP status, response content, and critical endpoints. Runnable standalone OR as the final step of the deploy skill.\"",
|
|
336
|
-
"sha256": "
|
|
336
|
+
"sha256": "050170d66ada581e",
|
|
337
337
|
"path": "skills/smoke-testSKILL.md"
|
|
338
338
|
},
|
|
339
339
|
"spike-prototype": {
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
},
|
|
359
359
|
"trace-requirement": {
|
|
360
360
|
"description": "Link story IDs from specs/release-plan.yaml + epic capsule directories to the implementing code and tests. Produces specs/TRACEABILITY_LATEST.md. Use when you want to verify coverage of a release plan, audit which stories are implemented, or find \"dark\" stories with no code.",
|
|
361
|
-
"sha256": "
|
|
361
|
+
"sha256": "f825b8f5849b963c",
|
|
362
362
|
"path": "skills/trace-requirementSKILL.md"
|
|
363
363
|
},
|
|
364
364
|
"using-bigpowers": {
|