@qball-inc/the-bulwark 1.0.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/.claude-plugin/plugin.json +43 -0
- package/agents/bulwark-fix-validator.md +633 -0
- package/agents/bulwark-implementer.md +391 -0
- package/agents/bulwark-issue-analyzer.md +308 -0
- package/agents/bulwark-standards-reviewer.md +221 -0
- package/agents/plan-creation-architect.md +323 -0
- package/agents/plan-creation-eng-lead.md +352 -0
- package/agents/plan-creation-po.md +300 -0
- package/agents/plan-creation-qa-critic.md +334 -0
- package/agents/product-ideation-competitive-analyzer.md +298 -0
- package/agents/product-ideation-idea-validator.md +268 -0
- package/agents/product-ideation-market-researcher.md +292 -0
- package/agents/product-ideation-pattern-documenter.md +308 -0
- package/agents/product-ideation-segment-analyzer.md +303 -0
- package/agents/product-ideation-strategist.md +259 -0
- package/agents/statusline-setup.md +97 -0
- package/hooks/hooks.json +59 -0
- package/package.json +45 -0
- package/scripts/hooks/cleanup-stale.sh +13 -0
- package/scripts/hooks/enforce-quality.sh +166 -0
- package/scripts/hooks/implementer-quality.sh +256 -0
- package/scripts/hooks/inject-protocol.sh +52 -0
- package/scripts/hooks/suggest-pipeline.sh +175 -0
- package/scripts/hooks/track-pipeline-start.sh +37 -0
- package/scripts/hooks/track-pipeline-stop.sh +52 -0
- package/scripts/init-rules.sh +35 -0
- package/scripts/init.sh +151 -0
- package/skills/anthropic-validator/SKILL.md +607 -0
- package/skills/anthropic-validator/references/agents-checklist.md +131 -0
- package/skills/anthropic-validator/references/commands-checklist.md +102 -0
- package/skills/anthropic-validator/references/hooks-checklist.md +151 -0
- package/skills/anthropic-validator/references/mcp-checklist.md +136 -0
- package/skills/anthropic-validator/references/plugins-checklist.md +148 -0
- package/skills/anthropic-validator/references/skills-checklist.md +85 -0
- package/skills/assertion-patterns/SKILL.md +296 -0
- package/skills/bug-magnet-data/SKILL.md +284 -0
- package/skills/bug-magnet-data/context/cli-args.md +91 -0
- package/skills/bug-magnet-data/context/db-query.md +104 -0
- package/skills/bug-magnet-data/context/file-contents.md +103 -0
- package/skills/bug-magnet-data/context/http-body.md +91 -0
- package/skills/bug-magnet-data/context/process-spawn.md +123 -0
- package/skills/bug-magnet-data/data/booleans/boundaries.yaml +143 -0
- package/skills/bug-magnet-data/data/collections/arrays.yaml +114 -0
- package/skills/bug-magnet-data/data/collections/objects.yaml +123 -0
- package/skills/bug-magnet-data/data/concurrency/race-conditions.yaml +118 -0
- package/skills/bug-magnet-data/data/concurrency/state-machines.yaml +115 -0
- package/skills/bug-magnet-data/data/dates/boundaries.yaml +137 -0
- package/skills/bug-magnet-data/data/dates/invalid.yaml +132 -0
- package/skills/bug-magnet-data/data/dates/timezone.yaml +118 -0
- package/skills/bug-magnet-data/data/encoding/charset.yaml +79 -0
- package/skills/bug-magnet-data/data/encoding/normalization.yaml +105 -0
- package/skills/bug-magnet-data/data/formats/email.yaml +154 -0
- package/skills/bug-magnet-data/data/formats/json.yaml +187 -0
- package/skills/bug-magnet-data/data/formats/url.yaml +165 -0
- package/skills/bug-magnet-data/data/language-specific/javascript.yaml +182 -0
- package/skills/bug-magnet-data/data/language-specific/python.yaml +174 -0
- package/skills/bug-magnet-data/data/language-specific/rust.yaml +148 -0
- package/skills/bug-magnet-data/data/numbers/boundaries.yaml +161 -0
- package/skills/bug-magnet-data/data/numbers/precision.yaml +89 -0
- package/skills/bug-magnet-data/data/numbers/special.yaml +69 -0
- package/skills/bug-magnet-data/data/strings/boundaries.yaml +109 -0
- package/skills/bug-magnet-data/data/strings/injection.yaml +208 -0
- package/skills/bug-magnet-data/data/strings/special-chars.yaml +190 -0
- package/skills/bug-magnet-data/data/strings/unicode.yaml +139 -0
- package/skills/bug-magnet-data/references/external-lists.md +115 -0
- package/skills/bulwark-brainstorm/SKILL.md +563 -0
- package/skills/bulwark-brainstorm/references/at-teammate-prompts.md +60 -0
- package/skills/bulwark-brainstorm/references/role-critical-analyst.md +78 -0
- package/skills/bulwark-brainstorm/references/role-development-lead.md +66 -0
- package/skills/bulwark-brainstorm/references/role-product-delivery-lead.md +79 -0
- package/skills/bulwark-brainstorm/references/role-product-manager.md +62 -0
- package/skills/bulwark-brainstorm/references/role-project-sme.md +59 -0
- package/skills/bulwark-brainstorm/references/role-technical-architect.md +66 -0
- package/skills/bulwark-research/SKILL.md +298 -0
- package/skills/bulwark-research/references/viewpoint-contrarian.md +63 -0
- package/skills/bulwark-research/references/viewpoint-direct-investigation.md +62 -0
- package/skills/bulwark-research/references/viewpoint-first-principles.md +65 -0
- package/skills/bulwark-research/references/viewpoint-practitioner.md +62 -0
- package/skills/bulwark-research/references/viewpoint-prior-art.md +66 -0
- package/skills/bulwark-scaffold/SKILL.md +330 -0
- package/skills/bulwark-statusline/SKILL.md +161 -0
- package/skills/bulwark-statusline/scripts/statusline.sh +144 -0
- package/skills/bulwark-verify/SKILL.md +519 -0
- package/skills/code-review/SKILL.md +428 -0
- package/skills/code-review/examples/anti-patterns/linting.ts +181 -0
- package/skills/code-review/examples/anti-patterns/security.ts +91 -0
- package/skills/code-review/examples/anti-patterns/standards.ts +195 -0
- package/skills/code-review/examples/anti-patterns/type-safety.ts +108 -0
- package/skills/code-review/examples/recommended/linting.ts +195 -0
- package/skills/code-review/examples/recommended/security.ts +154 -0
- package/skills/code-review/examples/recommended/standards.ts +231 -0
- package/skills/code-review/examples/recommended/type-safety.ts +181 -0
- package/skills/code-review/frameworks/angular.md +218 -0
- package/skills/code-review/frameworks/django.md +235 -0
- package/skills/code-review/frameworks/express.md +207 -0
- package/skills/code-review/frameworks/flask.md +298 -0
- package/skills/code-review/frameworks/generic.md +146 -0
- package/skills/code-review/frameworks/react.md +152 -0
- package/skills/code-review/frameworks/vue.md +244 -0
- package/skills/code-review/references/linting-patterns.md +221 -0
- package/skills/code-review/references/security-patterns.md +125 -0
- package/skills/code-review/references/standards-patterns.md +246 -0
- package/skills/code-review/references/type-safety-patterns.md +130 -0
- package/skills/component-patterns/SKILL.md +131 -0
- package/skills/component-patterns/references/pattern-cli-command.md +118 -0
- package/skills/component-patterns/references/pattern-database.md +166 -0
- package/skills/component-patterns/references/pattern-external-api.md +139 -0
- package/skills/component-patterns/references/pattern-file-parser.md +168 -0
- package/skills/component-patterns/references/pattern-http-server.md +162 -0
- package/skills/component-patterns/references/pattern-process-spawner.md +133 -0
- package/skills/continuous-feedback/SKILL.md +327 -0
- package/skills/continuous-feedback/references/collect-instructions.md +81 -0
- package/skills/continuous-feedback/references/specialize-code-review.md +82 -0
- package/skills/continuous-feedback/references/specialize-general.md +98 -0
- package/skills/continuous-feedback/references/specialize-test-audit.md +81 -0
- package/skills/create-skill/SKILL.md +359 -0
- package/skills/create-skill/references/agent-conventions.md +194 -0
- package/skills/create-skill/references/agent-template.md +195 -0
- package/skills/create-skill/references/content-guidance.md +291 -0
- package/skills/create-skill/references/decision-framework.md +124 -0
- package/skills/create-skill/references/template-pipeline.md +217 -0
- package/skills/create-skill/references/template-reference-heavy.md +111 -0
- package/skills/create-skill/references/template-research.md +210 -0
- package/skills/create-skill/references/template-script-driven.md +172 -0
- package/skills/create-skill/references/template-simple.md +80 -0
- package/skills/create-subagent/SKILL.md +353 -0
- package/skills/create-subagent/references/agent-conventions.md +268 -0
- package/skills/create-subagent/references/content-guidance.md +232 -0
- package/skills/create-subagent/references/decision-framework.md +134 -0
- package/skills/create-subagent/references/template-single-agent.md +192 -0
- package/skills/fix-bug/SKILL.md +241 -0
- package/skills/governance-protocol/SKILL.md +116 -0
- package/skills/init/SKILL.md +341 -0
- package/skills/issue-debugging/SKILL.md +385 -0
- package/skills/issue-debugging/references/anti-patterns.md +245 -0
- package/skills/issue-debugging/references/debug-report-schema.md +227 -0
- package/skills/mock-detection/SKILL.md +511 -0
- package/skills/mock-detection/references/false-positive-prevention.md +402 -0
- package/skills/mock-detection/references/stub-patterns.md +236 -0
- package/skills/pipeline-templates/SKILL.md +215 -0
- package/skills/pipeline-templates/references/code-change-workflow.md +277 -0
- package/skills/pipeline-templates/references/code-review.md +336 -0
- package/skills/pipeline-templates/references/fix-validation.md +421 -0
- package/skills/pipeline-templates/references/new-feature.md +335 -0
- package/skills/pipeline-templates/references/research-brainstorm.md +161 -0
- package/skills/pipeline-templates/references/research-planning.md +257 -0
- package/skills/pipeline-templates/references/test-audit.md +389 -0
- package/skills/pipeline-templates/references/test-execution-fix.md +238 -0
- package/skills/plan-creation/SKILL.md +497 -0
- package/skills/product-ideation/SKILL.md +372 -0
- package/skills/product-ideation/references/analysis-frameworks.md +161 -0
- package/skills/session-handoff/SKILL.md +139 -0
- package/skills/session-handoff/references/examples.md +223 -0
- package/skills/setup-lsp/SKILL.md +312 -0
- package/skills/setup-lsp/references/server-registry.md +85 -0
- package/skills/setup-lsp/references/troubleshooting.md +135 -0
- package/skills/subagent-output-templating/SKILL.md +415 -0
- package/skills/subagent-output-templating/references/examples.md +440 -0
- package/skills/subagent-prompting/SKILL.md +364 -0
- package/skills/subagent-prompting/references/examples.md +342 -0
- package/skills/test-audit/SKILL.md +531 -0
- package/skills/test-audit/references/known-limitations.md +41 -0
- package/skills/test-audit/references/priority-classification.md +30 -0
- package/skills/test-audit/references/prompts/deep-mode-detection.md +83 -0
- package/skills/test-audit/references/prompts/synthesis.md +57 -0
- package/skills/test-audit/references/rewrite-instructions.md +46 -0
- package/skills/test-audit/references/schemas/audit-output.yaml +100 -0
- package/skills/test-audit/references/schemas/diagnostic-output.yaml +49 -0
- package/skills/test-audit/scripts/data-flow-analyzer.ts +509 -0
- package/skills/test-audit/scripts/integration-mock-detector.ts +462 -0
- package/skills/test-audit/scripts/package.json +20 -0
- package/skills/test-audit/scripts/skip-detector.ts +211 -0
- package/skills/test-audit/scripts/verification-counter.ts +295 -0
- package/skills/test-classification/SKILL.md +310 -0
- package/skills/test-fixture-creation/SKILL.md +295 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# CLI Arguments Context
|
|
2
|
+
|
|
3
|
+
Edge case guidance for testing command-line argument handling.
|
|
4
|
+
|
|
5
|
+
## Applicable Categories
|
|
6
|
+
|
|
7
|
+
| Category | Priority | Why |
|
|
8
|
+
|----------|----------|-----|
|
|
9
|
+
| strings/boundaries | T0 | Empty args, long args, whitespace |
|
|
10
|
+
| strings/special-chars | T1 | Quotes, spaces, backslashes, equals signs |
|
|
11
|
+
| strings/injection | T1 | Command injection only (;, |, &&) |
|
|
12
|
+
| numbers/boundaries | T0 | Numeric arguments |
|
|
13
|
+
|
|
14
|
+
## Not Applicable (Skip)
|
|
15
|
+
|
|
16
|
+
| Category | Why Skip |
|
|
17
|
+
|----------|----------|
|
|
18
|
+
| strings/injection (SQL, XSS) | CLI doesn't use SQL/HTML |
|
|
19
|
+
| formats/email, formats/url | Unless CLI specifically processes these |
|
|
20
|
+
| encoding/normalization | Usually ASCII-only |
|
|
21
|
+
| dates/timezone | Unless date arguments expected |
|
|
22
|
+
|
|
23
|
+
## Key Edge Cases
|
|
24
|
+
|
|
25
|
+
### Empty and Whitespace
|
|
26
|
+
```bash
|
|
27
|
+
# Empty argument
|
|
28
|
+
./cli ""
|
|
29
|
+
|
|
30
|
+
# Whitespace-only argument
|
|
31
|
+
./cli " "
|
|
32
|
+
|
|
33
|
+
# No arguments when required
|
|
34
|
+
./cli
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Quoting and Escaping
|
|
38
|
+
```bash
|
|
39
|
+
# Argument with spaces
|
|
40
|
+
./cli "hello world"
|
|
41
|
+
|
|
42
|
+
# Argument with quotes
|
|
43
|
+
./cli "say \"hello\""
|
|
44
|
+
|
|
45
|
+
# Argument with backslash
|
|
46
|
+
./cli "path\\to\\file"
|
|
47
|
+
|
|
48
|
+
# Argument with equals
|
|
49
|
+
./cli --key=value=with=equals
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Special Characters
|
|
53
|
+
```bash
|
|
54
|
+
# Glob characters (shouldn't expand)
|
|
55
|
+
./cli "*.txt"
|
|
56
|
+
|
|
57
|
+
# Dollar sign (shouldn't expand)
|
|
58
|
+
./cli '$HOME'
|
|
59
|
+
|
|
60
|
+
# Backticks (shouldn't execute)
|
|
61
|
+
./cli '`whoami`'
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Command Injection Attempts
|
|
65
|
+
```bash
|
|
66
|
+
# Semicolon injection
|
|
67
|
+
./cli "file; rm -rf /"
|
|
68
|
+
|
|
69
|
+
# Pipe injection
|
|
70
|
+
./cli "file | cat /etc/passwd"
|
|
71
|
+
|
|
72
|
+
# Subcommand injection
|
|
73
|
+
./cli "$(whoami)"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Length Extremes
|
|
77
|
+
```bash
|
|
78
|
+
# Very long argument
|
|
79
|
+
./cli "$(python -c 'print("a" * 10000)')"
|
|
80
|
+
|
|
81
|
+
# Many arguments
|
|
82
|
+
./cli arg1 arg2 arg3 ... arg1000
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Consumer Usage
|
|
86
|
+
|
|
87
|
+
When test-audit or bulwark-verify processes CLI-related code:
|
|
88
|
+
1. Load strings/boundaries
|
|
89
|
+
2. Load strings/special-chars
|
|
90
|
+
3. Load command injection patterns from strings/injection
|
|
91
|
+
4. Skip SQL/XSS patterns
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Database Query Context
|
|
2
|
+
|
|
3
|
+
Edge case guidance for testing database operations.
|
|
4
|
+
|
|
5
|
+
## Applicable Categories
|
|
6
|
+
|
|
7
|
+
| Category | Priority | Why |
|
|
8
|
+
|----------|----------|-----|
|
|
9
|
+
| strings/boundaries | T0 | Empty strings, long strings |
|
|
10
|
+
| strings/injection | T0 | SQL injection (if raw queries) |
|
|
11
|
+
| numbers/boundaries | T0 | Integer limits, ID values |
|
|
12
|
+
| booleans/boundaries | T0 | NULL handling |
|
|
13
|
+
| dates/boundaries | T1 | Date range queries |
|
|
14
|
+
| dates/timezone | T2 | Timezone-aware date storage |
|
|
15
|
+
|
|
16
|
+
## When to SKIP SQL Injection
|
|
17
|
+
|
|
18
|
+
| Scenario | Skip? | Why |
|
|
19
|
+
|----------|-------|-----|
|
|
20
|
+
| Using ORM with parameterized queries | Yes | ORM handles escaping |
|
|
21
|
+
| Raw SQL with string concatenation | No | Test thoroughly |
|
|
22
|
+
| Stored procedures with parameters | Maybe | Check parameter handling |
|
|
23
|
+
| Dynamic table/column names | No | These can't be parameterized |
|
|
24
|
+
|
|
25
|
+
## Key Edge Cases
|
|
26
|
+
|
|
27
|
+
### NULL Handling
|
|
28
|
+
```sql
|
|
29
|
+
-- NULL in WHERE
|
|
30
|
+
WHERE column = NULL -- Never matches! Use IS NULL
|
|
31
|
+
|
|
32
|
+
-- NULL in comparisons
|
|
33
|
+
WHERE column > NULL -- Always NULL (unknown)
|
|
34
|
+
|
|
35
|
+
-- NULL in aggregates
|
|
36
|
+
SELECT AVG(price) -- Excludes NULLs
|
|
37
|
+
|
|
38
|
+
-- COALESCE edge cases
|
|
39
|
+
COALESCE(NULL, NULL, 'default')
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### String Edge Cases
|
|
43
|
+
```sql
|
|
44
|
+
-- Empty string vs NULL (database dependent)
|
|
45
|
+
INSERT INTO t (col) VALUES ('') -- Oracle: becomes NULL
|
|
46
|
+
|
|
47
|
+
-- Unicode
|
|
48
|
+
INSERT INTO t (name) VALUES ('José 😀')
|
|
49
|
+
|
|
50
|
+
-- Very long strings
|
|
51
|
+
INSERT INTO t (col) VALUES (/* 10000 char string */)
|
|
52
|
+
|
|
53
|
+
-- Quotes in data (parameterized handles this)
|
|
54
|
+
INSERT INTO t (col) VALUES ('O''Brien')
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Numeric Edge Cases
|
|
58
|
+
```sql
|
|
59
|
+
-- ID boundaries
|
|
60
|
+
SELECT * FROM t WHERE id = 0
|
|
61
|
+
SELECT * FROM t WHERE id = -1
|
|
62
|
+
SELECT * FROM t WHERE id = 2147483647 -- INT_MAX
|
|
63
|
+
|
|
64
|
+
-- Division by zero
|
|
65
|
+
SELECT amount / quantity FROM orders -- What if quantity = 0?
|
|
66
|
+
|
|
67
|
+
-- Precision
|
|
68
|
+
INSERT INTO t (price) VALUES (0.1 + 0.2) -- Floating point
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Date Edge Cases
|
|
72
|
+
```sql
|
|
73
|
+
-- Epoch
|
|
74
|
+
WHERE created_at = '1970-01-01'
|
|
75
|
+
|
|
76
|
+
-- Y2K38
|
|
77
|
+
WHERE expires_at > '2038-01-19 03:14:07'
|
|
78
|
+
|
|
79
|
+
-- Timezone
|
|
80
|
+
WHERE created_at = '2024-03-10 02:30:00' -- DST gap
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Query Result Edge Cases
|
|
84
|
+
```sql
|
|
85
|
+
-- No results
|
|
86
|
+
SELECT * FROM empty_table
|
|
87
|
+
|
|
88
|
+
-- One result
|
|
89
|
+
SELECT * FROM t LIMIT 1
|
|
90
|
+
|
|
91
|
+
-- Many results (pagination, memory)
|
|
92
|
+
SELECT * FROM million_row_table
|
|
93
|
+
|
|
94
|
+
-- Duplicate keys
|
|
95
|
+
INSERT INTO t (id) VALUES (existing_id)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Consumer Usage
|
|
99
|
+
|
|
100
|
+
When test-audit checks database test coverage:
|
|
101
|
+
1. Check for NULL handling tests
|
|
102
|
+
2. Check for boundary value tests on numeric columns
|
|
103
|
+
3. If raw SQL: check for injection test cases
|
|
104
|
+
4. Check for empty result and single result handling
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# File Contents Context
|
|
2
|
+
|
|
3
|
+
Edge case guidance for testing file I/O and parsing.
|
|
4
|
+
|
|
5
|
+
## Applicable Categories
|
|
6
|
+
|
|
7
|
+
| Category | Priority | Why |
|
|
8
|
+
|----------|----------|-----|
|
|
9
|
+
| strings/boundaries | T0 | Empty files, large files |
|
|
10
|
+
| encoding/charset | T1 | BOM, encoding detection |
|
|
11
|
+
| encoding/normalization | T2 | Unicode in file contents |
|
|
12
|
+
| strings/special-chars | T1 | Control characters, line endings |
|
|
13
|
+
| formats/json | T0 | If parsing JSON files |
|
|
14
|
+
|
|
15
|
+
## Not Applicable (Skip)
|
|
16
|
+
|
|
17
|
+
| Category | Why Skip |
|
|
18
|
+
|----------|----------|
|
|
19
|
+
| strings/injection | Files aren't executed (usually) |
|
|
20
|
+
| formats/email, formats/url | Unless file contains these |
|
|
21
|
+
| concurrency/* | Test at file system level separately |
|
|
22
|
+
|
|
23
|
+
## Key Edge Cases
|
|
24
|
+
|
|
25
|
+
### Empty and Size
|
|
26
|
+
```
|
|
27
|
+
# Empty file (0 bytes)
|
|
28
|
+
# Single byte file
|
|
29
|
+
# Very large file (>2GB for 32-bit limits)
|
|
30
|
+
# File size exactly at buffer boundary
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Line Endings
|
|
34
|
+
```
|
|
35
|
+
# Unix (LF only)
|
|
36
|
+
line1\nline2\n
|
|
37
|
+
|
|
38
|
+
# Windows (CRLF)
|
|
39
|
+
line1\r\nline2\r\n
|
|
40
|
+
|
|
41
|
+
# Classic Mac (CR only)
|
|
42
|
+
line1\rline2\r
|
|
43
|
+
|
|
44
|
+
# Mixed
|
|
45
|
+
line1\nline2\r\nline3\r
|
|
46
|
+
|
|
47
|
+
# No trailing newline
|
|
48
|
+
line1\nline2
|
|
49
|
+
|
|
50
|
+
# Only newlines
|
|
51
|
+
\n\n\n
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Encoding
|
|
55
|
+
```
|
|
56
|
+
# UTF-8 with BOM
|
|
57
|
+
\xEF\xBB\xBF...content...
|
|
58
|
+
|
|
59
|
+
# UTF-16 LE with BOM
|
|
60
|
+
\xFF\xFE...content...
|
|
61
|
+
|
|
62
|
+
# Latin-1 (looks like broken UTF-8)
|
|
63
|
+
caf\xe9
|
|
64
|
+
|
|
65
|
+
# Invalid UTF-8 sequences
|
|
66
|
+
\x80\x81\x82
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Special Characters
|
|
70
|
+
```
|
|
71
|
+
# Null bytes in middle
|
|
72
|
+
hello\x00world
|
|
73
|
+
|
|
74
|
+
# Control characters
|
|
75
|
+
line\x07\x08\x1B
|
|
76
|
+
|
|
77
|
+
# Tabs mixed with spaces
|
|
78
|
+
\t \t content
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### File Names (for path handling)
|
|
82
|
+
```
|
|
83
|
+
# Spaces in name
|
|
84
|
+
my file.txt
|
|
85
|
+
|
|
86
|
+
# Unicode in name
|
|
87
|
+
café.txt
|
|
88
|
+
|
|
89
|
+
# Very long name
|
|
90
|
+
aaaa...200 chars...aaaa.txt
|
|
91
|
+
|
|
92
|
+
# Special characters
|
|
93
|
+
file;name.txt
|
|
94
|
+
../traversal.txt
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Consumer Usage
|
|
98
|
+
|
|
99
|
+
When bulwark-verify generates file I/O tests:
|
|
100
|
+
1. Load strings/boundaries for size edge cases
|
|
101
|
+
2. Load encoding/charset for BOM and encoding tests
|
|
102
|
+
3. Load strings/special-chars for control characters
|
|
103
|
+
4. Consider file format (JSON, XML, etc.) for format-specific tests
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# HTTP Body Context
|
|
2
|
+
|
|
3
|
+
Edge case guidance for testing HTTP request/response body handling.
|
|
4
|
+
|
|
5
|
+
## Applicable Categories
|
|
6
|
+
|
|
7
|
+
| Category | Priority | Why |
|
|
8
|
+
|----------|----------|-----|
|
|
9
|
+
| strings/boundaries | T0 | Empty body, large payloads |
|
|
10
|
+
| strings/unicode | T1 | Multi-byte characters, emoji |
|
|
11
|
+
| strings/injection | T1 | All patterns (depends on content type) |
|
|
12
|
+
| formats/json | T0 | JSON body parsing |
|
|
13
|
+
| formats/email | T2 | If form contains email fields |
|
|
14
|
+
| formats/url | T2 | If body contains URLs |
|
|
15
|
+
| encoding/charset | T1 | Content-Type charset handling |
|
|
16
|
+
| numbers/boundaries | T0 | Numeric fields |
|
|
17
|
+
|
|
18
|
+
## Not Applicable (Skip)
|
|
19
|
+
|
|
20
|
+
| Category | Why Skip |
|
|
21
|
+
|----------|----------|
|
|
22
|
+
| concurrency/state-machines | Test separately at higher level |
|
|
23
|
+
| language-specific/* | HTTP is language-agnostic |
|
|
24
|
+
|
|
25
|
+
## Key Edge Cases by Content-Type
|
|
26
|
+
|
|
27
|
+
### application/json
|
|
28
|
+
```json
|
|
29
|
+
// Empty object
|
|
30
|
+
{}
|
|
31
|
+
|
|
32
|
+
// Empty array
|
|
33
|
+
[]
|
|
34
|
+
|
|
35
|
+
// Deep nesting
|
|
36
|
+
{"a":{"b":{"c":{"d":{"e":1}}}}}
|
|
37
|
+
|
|
38
|
+
// Large numbers
|
|
39
|
+
{"n": 99999999999999999999}
|
|
40
|
+
|
|
41
|
+
// Unicode
|
|
42
|
+
{"name": "José 😀"}
|
|
43
|
+
|
|
44
|
+
// Prototype pollution
|
|
45
|
+
{"__proto__": {"polluted": true}}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### application/x-www-form-urlencoded
|
|
49
|
+
```
|
|
50
|
+
# Empty value
|
|
51
|
+
field=
|
|
52
|
+
|
|
53
|
+
# Multiple values
|
|
54
|
+
field=a&field=b
|
|
55
|
+
|
|
56
|
+
# Special characters
|
|
57
|
+
field=hello+world&other=a%26b
|
|
58
|
+
|
|
59
|
+
# Unicode
|
|
60
|
+
name=%C3%A9 (é encoded)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### multipart/form-data
|
|
64
|
+
- Empty file upload
|
|
65
|
+
- Very large file
|
|
66
|
+
- File with special filename
|
|
67
|
+
- File with wrong content-type
|
|
68
|
+
- Binary file with null bytes
|
|
69
|
+
|
|
70
|
+
### text/plain
|
|
71
|
+
- Empty body
|
|
72
|
+
- Very large body
|
|
73
|
+
- Binary characters
|
|
74
|
+
- Mixed line endings (CRLF, LF)
|
|
75
|
+
|
|
76
|
+
## Injection Context
|
|
77
|
+
|
|
78
|
+
| Content-Type | Applicable Injection Patterns |
|
|
79
|
+
|--------------|------------------------------|
|
|
80
|
+
| application/json | All (depending on backend use) |
|
|
81
|
+
| text/html | XSS patterns critical |
|
|
82
|
+
| text/plain | Depends on processing |
|
|
83
|
+
| application/xml | XXE patterns |
|
|
84
|
+
|
|
85
|
+
## Consumer Usage
|
|
86
|
+
|
|
87
|
+
When bulwark-verify generates HTTP body tests:
|
|
88
|
+
1. Identify Content-Type
|
|
89
|
+
2. Load formats/ category for that type
|
|
90
|
+
3. Load strings/boundaries
|
|
91
|
+
4. Load relevant injection patterns based on how data is used
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Process Spawn Context
|
|
2
|
+
|
|
3
|
+
Edge case guidance for testing subprocess execution.
|
|
4
|
+
|
|
5
|
+
## Applicable Categories
|
|
6
|
+
|
|
7
|
+
| Category | Priority | Why |
|
|
8
|
+
|----------|----------|-----|
|
|
9
|
+
| strings/boundaries | T0 | Empty args, long commands |
|
|
10
|
+
| strings/special-chars | T0 | Quotes, spaces, escaping |
|
|
11
|
+
| strings/injection | T0 | Command injection CRITICAL |
|
|
12
|
+
| numbers/boundaries | T1 | Exit codes, timeouts |
|
|
13
|
+
|
|
14
|
+
## Not Applicable (Skip)
|
|
15
|
+
|
|
16
|
+
| Category | Why Skip |
|
|
17
|
+
|----------|----------|
|
|
18
|
+
| strings/injection (SQL, XSS) | Not relevant to process spawn |
|
|
19
|
+
| formats/* | Process args are strings |
|
|
20
|
+
| dates/* | Unless date is an argument |
|
|
21
|
+
|
|
22
|
+
## Security Priority
|
|
23
|
+
|
|
24
|
+
**Command injection is the #1 risk.** Always test:
|
|
25
|
+
1. Semicolon injection: `; rm -rf /`
|
|
26
|
+
2. Pipe injection: `| cat /etc/passwd`
|
|
27
|
+
3. Backtick injection: `` `whoami` ``
|
|
28
|
+
4. Subcommand injection: `$(whoami)`
|
|
29
|
+
5. Newline injection: `\nmalicious`
|
|
30
|
+
6. Argument injection: `--help` where unexpected
|
|
31
|
+
|
|
32
|
+
## Key Edge Cases
|
|
33
|
+
|
|
34
|
+
### Argument Handling
|
|
35
|
+
```bash
|
|
36
|
+
# Arguments with spaces
|
|
37
|
+
spawn("cmd", ["arg with spaces"])
|
|
38
|
+
|
|
39
|
+
# Arguments with quotes
|
|
40
|
+
spawn("cmd", ['say "hello"'])
|
|
41
|
+
|
|
42
|
+
# Arguments with special shell chars
|
|
43
|
+
spawn("cmd", ["$HOME", "`pwd`", "$(id)"])
|
|
44
|
+
|
|
45
|
+
# Empty arguments
|
|
46
|
+
spawn("cmd", ["", "arg2"])
|
|
47
|
+
|
|
48
|
+
# Many arguments
|
|
49
|
+
spawn("cmd", Array(1000).fill("arg"))
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Environment Variables
|
|
53
|
+
```javascript
|
|
54
|
+
// Sensitive env vars
|
|
55
|
+
spawn("cmd", [], { env: { PASSWORD: "secret" } })
|
|
56
|
+
|
|
57
|
+
// PATH manipulation
|
|
58
|
+
spawn("cmd", [], { env: { PATH: "/tmp:$PATH" } })
|
|
59
|
+
|
|
60
|
+
// Empty env
|
|
61
|
+
spawn("cmd", [], { env: {} })
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Working Directory
|
|
65
|
+
```javascript
|
|
66
|
+
// Non-existent directory
|
|
67
|
+
spawn("cmd", [], { cwd: "/nonexistent" })
|
|
68
|
+
|
|
69
|
+
// Relative path
|
|
70
|
+
spawn("cmd", [], { cwd: "../.." })
|
|
71
|
+
|
|
72
|
+
// Path with spaces
|
|
73
|
+
spawn("cmd", [], { cwd: "/path with spaces" })
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Exit Codes
|
|
77
|
+
```javascript
|
|
78
|
+
// Success
|
|
79
|
+
expect(exitCode).toBe(0)
|
|
80
|
+
|
|
81
|
+
// Standard failure
|
|
82
|
+
expect(exitCode).toBe(1)
|
|
83
|
+
|
|
84
|
+
// Signal termination
|
|
85
|
+
expect(exitCode).toBe(128 + signalNumber)
|
|
86
|
+
|
|
87
|
+
// Exit code boundaries
|
|
88
|
+
exitCode === 255 // -1 as unsigned byte
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Process Lifecycle
|
|
92
|
+
```javascript
|
|
93
|
+
// Timeout handling
|
|
94
|
+
const proc = spawn("sleep", ["3600"])
|
|
95
|
+
setTimeout(() => proc.kill(), 1000)
|
|
96
|
+
|
|
97
|
+
// Stdin closing
|
|
98
|
+
proc.stdin.end()
|
|
99
|
+
|
|
100
|
+
// stdout/stderr buffering
|
|
101
|
+
// What if output is very large?
|
|
102
|
+
|
|
103
|
+
// Zombie processes
|
|
104
|
+
// What if parent doesn't wait()?
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Shell vs Direct Execution
|
|
108
|
+
```javascript
|
|
109
|
+
// Direct (safer)
|
|
110
|
+
spawn("ls", ["-la"])
|
|
111
|
+
|
|
112
|
+
// Via shell (dangerous)
|
|
113
|
+
spawn("sh", ["-c", userInput]) // NEVER do this
|
|
114
|
+
exec(userInput) // NEVER do this
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Consumer Usage
|
|
118
|
+
|
|
119
|
+
When bulwark-verify generates process spawn tests:
|
|
120
|
+
1. Load ALL command injection patterns (T0 priority)
|
|
121
|
+
2. Load strings/special-chars for escaping tests
|
|
122
|
+
3. Include exit code boundary tests
|
|
123
|
+
4. Test timeout and kill handling
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
metadata:
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
last_updated: "2026-02-01"
|
|
4
|
+
source_urls: []
|
|
5
|
+
|
|
6
|
+
category: booleans
|
|
7
|
+
subcategory: boundaries
|
|
8
|
+
tier: T0
|
|
9
|
+
|
|
10
|
+
bugs_caught:
|
|
11
|
+
- "Null reference exceptions"
|
|
12
|
+
- "Truthy/falsy confusion"
|
|
13
|
+
- "Type coercion bugs"
|
|
14
|
+
|
|
15
|
+
values:
|
|
16
|
+
true:
|
|
17
|
+
value: true
|
|
18
|
+
bugs_caught:
|
|
19
|
+
- "Boolean true handling"
|
|
20
|
+
safe_for_automation: true
|
|
21
|
+
|
|
22
|
+
false:
|
|
23
|
+
value: false
|
|
24
|
+
bugs_caught:
|
|
25
|
+
- "Boolean false handling"
|
|
26
|
+
- "Falsy but valid distinction"
|
|
27
|
+
safe_for_automation: true
|
|
28
|
+
|
|
29
|
+
null:
|
|
30
|
+
value: null
|
|
31
|
+
bugs_caught:
|
|
32
|
+
- "Null reference exceptions"
|
|
33
|
+
- "null vs undefined"
|
|
34
|
+
- "Optional chaining need"
|
|
35
|
+
safe_for_automation: true
|
|
36
|
+
|
|
37
|
+
undefined:
|
|
38
|
+
value: "undefined"
|
|
39
|
+
bugs_caught:
|
|
40
|
+
- "Undefined variable access"
|
|
41
|
+
- "Missing property handling"
|
|
42
|
+
safe_for_automation: true
|
|
43
|
+
note: "JavaScript-specific"
|
|
44
|
+
|
|
45
|
+
# Truthy values that aren't true
|
|
46
|
+
truthy_string:
|
|
47
|
+
value: "false"
|
|
48
|
+
bugs_caught:
|
|
49
|
+
- "String 'false' is truthy"
|
|
50
|
+
- "Boolean string parsing"
|
|
51
|
+
safe_for_automation: true
|
|
52
|
+
|
|
53
|
+
truthy_zero_string:
|
|
54
|
+
value: "0"
|
|
55
|
+
bugs_caught:
|
|
56
|
+
- "String '0' is truthy"
|
|
57
|
+
safe_for_automation: true
|
|
58
|
+
|
|
59
|
+
truthy_empty_array:
|
|
60
|
+
value: []
|
|
61
|
+
bugs_caught:
|
|
62
|
+
- "Empty array is truthy (JavaScript)"
|
|
63
|
+
- "Array length check needed"
|
|
64
|
+
safe_for_automation: true
|
|
65
|
+
note: "JavaScript: [] is truthy, Python: [] is falsy"
|
|
66
|
+
|
|
67
|
+
truthy_empty_object:
|
|
68
|
+
value: {}
|
|
69
|
+
bugs_caught:
|
|
70
|
+
- "Empty object is truthy"
|
|
71
|
+
- "Object.keys check needed"
|
|
72
|
+
safe_for_automation: true
|
|
73
|
+
|
|
74
|
+
# Falsy values that aren't false
|
|
75
|
+
falsy_zero:
|
|
76
|
+
value: 0
|
|
77
|
+
bugs_caught:
|
|
78
|
+
- "Zero is falsy but valid"
|
|
79
|
+
- "0 vs null confusion"
|
|
80
|
+
safe_for_automation: true
|
|
81
|
+
|
|
82
|
+
falsy_empty_string:
|
|
83
|
+
value: ""
|
|
84
|
+
bugs_caught:
|
|
85
|
+
- "Empty string is falsy"
|
|
86
|
+
- "'' vs null confusion"
|
|
87
|
+
safe_for_automation: true
|
|
88
|
+
|
|
89
|
+
falsy_nan:
|
|
90
|
+
value: "NaN"
|
|
91
|
+
bugs_caught:
|
|
92
|
+
- "NaN is falsy"
|
|
93
|
+
safe_for_automation: true
|
|
94
|
+
|
|
95
|
+
# Boolean-like strings
|
|
96
|
+
bool_string_true:
|
|
97
|
+
value: "true"
|
|
98
|
+
bugs_caught:
|
|
99
|
+
- "Boolean string parsing"
|
|
100
|
+
safe_for_automation: true
|
|
101
|
+
|
|
102
|
+
bool_string_True:
|
|
103
|
+
value: "True"
|
|
104
|
+
bugs_caught:
|
|
105
|
+
- "Case-sensitive boolean parsing"
|
|
106
|
+
safe_for_automation: true
|
|
107
|
+
|
|
108
|
+
bool_string_TRUE:
|
|
109
|
+
value: "TRUE"
|
|
110
|
+
bugs_caught:
|
|
111
|
+
- "Uppercase boolean parsing"
|
|
112
|
+
safe_for_automation: true
|
|
113
|
+
|
|
114
|
+
bool_string_yes:
|
|
115
|
+
value: "yes"
|
|
116
|
+
bugs_caught:
|
|
117
|
+
- "YAML-style boolean"
|
|
118
|
+
safe_for_automation: true
|
|
119
|
+
|
|
120
|
+
bool_string_on:
|
|
121
|
+
value: "on"
|
|
122
|
+
bugs_caught:
|
|
123
|
+
- "Form checkbox value"
|
|
124
|
+
safe_for_automation: true
|
|
125
|
+
|
|
126
|
+
bool_string_1:
|
|
127
|
+
value: "1"
|
|
128
|
+
bugs_caught:
|
|
129
|
+
- "Numeric boolean"
|
|
130
|
+
safe_for_automation: true
|
|
131
|
+
|
|
132
|
+
bool_number_1:
|
|
133
|
+
value: 1
|
|
134
|
+
bugs_caught:
|
|
135
|
+
- "Number 1 as boolean"
|
|
136
|
+
safe_for_automation: true
|
|
137
|
+
|
|
138
|
+
bool_number_2:
|
|
139
|
+
value: 2
|
|
140
|
+
bugs_caught:
|
|
141
|
+
- "Non-zero non-one number"
|
|
142
|
+
- "Truthy but not === true"
|
|
143
|
+
safe_for_automation: true
|