Skip to content

Commit 5cd48c7

Browse files
committed
docs: update expected counts in manual test documentation
Update CVE affected application counts to reflect current test data: - CVE-2025-31651: 72 → 70 apps - CVE-2025-41248: 22 → 21 apps - CVE-2025-22233: 79 → 77 apps
1 parent 406ad28 commit 5cd48c7

File tree

2 files changed

+63
-16
lines changed

2 files changed

+63
-16
lines changed

manual-tests/list-applications-by-cve-manual-test.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ The organization has applications with various CVEs. Below are representative sa
2525
| CVE ID | Severity | Library | Affected Apps | Description |
2626
|--------|----------|---------|---------------|-------------|
2727
| CVE-2021-44228 | Critical | log4j-core | 20 | Log4Shell - remote code execution via JNDI |
28-
| CVE-2025-31651 | Critical | tomcat-embed-core | 72 | Apache Tomcat rewrite rule bypass |
29-
| CVE-2025-41248 | High | spring-security-core | 22 | Spring Security annotation bypass |
30-
| CVE-2025-22233 | Low | spring-context | 79 | Spring Framework disallowedFields bypass |
31-
| CVE-2025-48989 | High | tomcat-embed-core | 72 | Apache Tomcat reset attack |
28+
| CVE-2025-31651 | Critical | tomcat-embed-core | 70 | Apache Tomcat rewrite rule bypass |
29+
| CVE-2025-41248 | High | spring-security-core | 21 | Spring Security annotation bypass |
30+
| CVE-2025-22233 | Low | spring-context | 77 | Spring Framework disallowedFields bypass |
31+
| CVE-2025-48989 | High | tomcat-embed-core | 70 | Apache Tomcat reset attack |
3232

3333
### Sample Applications for Verification
3434

@@ -71,7 +71,7 @@ use contrast mcp to find applications affected by CVE-2025-31651
7171

7272
**Expected Result:**
7373
- `found: true`
74-
- ~72 affected applications
74+
- ~70 affected applications
7575
- Library: tomcat-embed-core (various versions 8.5.x, 9.0.x, 10.1.x, 11.0.x)
7676
- Applications include: WebGoat_service27, petclinic applications, buildpack applications
7777
- Description mentions "Apache Tomcat" and "rewrite rule"
@@ -88,7 +88,7 @@ use contrast mcp to find applications affected by CVE-2025-41248
8888

8989
**Expected Result:**
9090
- `found: true`
91-
- ~22 affected applications
91+
- ~21 affected applications
9292
- Library: spring-security-core (versions 6.4.2, 6.4.4)
9393
- Description mentions "@PreAuthorize", "@EnableMethodSecurity", "authorization bypass"
9494
- Applications include: WebGoat_service27, webgoat-pavanr, Buildpack applications
@@ -105,7 +105,7 @@ use contrast mcp to find applications affected by CVE-2025-22233
105105

106106
**Expected Result:**
107107
- `found: true`
108-
- ~79 affected applications (larger impact)
108+
- ~77 affected applications (larger impact)
109109
- Library: spring-context (many versions from 2.0.1 to 6.2.6)
110110
- Description mentions "disallowedFields" and "Spring Framework"
111111
- Applications include widespread WebGoat and petclinic applications
@@ -290,10 +290,10 @@ use contrast mcp to find applications affected by CVE-2025-31651 and show impact
290290

291291
**Expected Result:**
292292
- `impactStats` object with:
293-
- `impactedAppCount`: ~72
293+
- `impactedAppCount`: ~70
294294
- `totalAppCount`: ~8010 (total apps in org)
295-
- `impactedServerCount`: ~118
296-
- `totalServerCount`: ~227
295+
- `impactedServerCount`: ~116
296+
- `totalServerCount`: ~224
297297
- `appPercentage`: ~0.9% of apps affected
298298
- `serverPercentage`: ~52% of servers affected
299299

@@ -308,8 +308,8 @@ use contrast mcp to compare the impact of CVE-2025-31651 vs CVE-2025-41248
308308
```
309309

310310
**Expected Result:**
311-
- CVE-2025-31651 (Tomcat): ~72 apps, ~52% servers
312-
- CVE-2025-41248 (Spring Security): ~22 apps, ~15% servers
311+
- CVE-2025-31651 (Tomcat): ~70 apps, ~52% servers
312+
- CVE-2025-41248 (Spring Security): ~21 apps, ~15% servers
313313
- Different libraries have different adoption rates
314314

315315
---
@@ -588,9 +588,9 @@ use contrast mcp to find apps affected by CVE-2021-44228 and verify one app exis
588588
| Test # | Category | Purpose | Expected Behavior |
589589
|--------|----------|---------|-------------------|
590590
| 1 | Basic | Log4Shell lookup | Returns ~20 apps, log4j libraries |
591-
| 2 | Basic | Tomcat CVE lookup | Returns ~72 apps, tomcat libraries |
592-
| 3 | Basic | Spring Security CVE | Returns ~22 apps |
593-
| 4 | Basic | Low severity CVE | Returns ~79 apps |
591+
| 2 | Basic | Tomcat CVE lookup | Returns ~70 apps, tomcat libraries |
592+
| 3 | Basic | Spring Security CVE | Returns ~21 apps |
593+
| 4 | Basic | Low severity CVE | Returns ~77 apps |
594594
| 5 | Basic | Tomcat DOS CVE | Returns affected apps |
595595
| 6 | Format | Uppercase CVE | Success |
596596
| 7 | Format | Lowercase CVE | Success or validation error |

manual-tests/search-attacks-manual-test.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ search_attacks(quickFilter="ALL", pageSize=100)
2828

2929
### Step 2: Derive Expected Values Using Code
3030

31-
**CRITICAL: Do NOT manually count values by visually inspecting the JSON response.**
31+
**CRITICAL--THIS IS EXTREMELY IMPORTANT!!!: Do NOT manually count values by visually inspecting the JSON response.**
3232
Manual counting is error-prone, especially for nested arrays like `rules`. You MUST use
3333
`jq` or equivalent code to compute all baseline metrics programmatically.
3434

@@ -115,6 +115,53 @@ echo "$BASELINE" | jq 'reduce .items[] as $item ({}; .[$item.source] += [$item.a
115115
| `HIGH_PROBE_ATTACK` | `.items \| max_by(.probes) \| .attackId` |
116116
| `MULTI_APP_ATTACKS` | `[.items[] \| select((.applications \| length) > 1)] \| length` |
117117

118+
### Complete Baseline Script
119+
120+
Save the baseline JSON to a file, then run this script to compute all metrics at once:
121+
122+
```bash
123+
#!/bin/bash
124+
# Usage: ./compute_baseline.sh baseline_attacks.json
125+
126+
BASELINE=$(cat "${1:-baseline_attacks.json}")
127+
128+
echo "=== STATUS COUNTS ==="
129+
echo "TOTAL_ATTACKS: $(echo "$BASELINE" | jq '.totalItems')"
130+
echo "EXPLOITED_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.status == "EXPLOITED")] | length')"
131+
echo "BLOCKED_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.status == "BLOCKED")] | length')"
132+
echo "PROBED_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.status == "PROBED")] | length')"
133+
echo "EFFECTIVE_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.status != "PROBED")] | length')"
134+
135+
echo ""
136+
echo "=== RULE-BASED COUNTS ==="
137+
echo "SQL_INJECTION_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.rules[] | contains("SQL Injection"))] | unique_by(.attackId) | length')"
138+
echo "COMMAND_INJECTION_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.rules[] | contains("Command Injection"))] | unique_by(.attackId) | length')"
139+
echo "XXE_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.rules[] | contains("XML External Entity"))] | unique_by(.attackId) | length')"
140+
echo "LOG4SHELL_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.rules[] | contains("Log4"))] | unique_by(.attackId) | length')"
141+
echo "DESERIALIZATION_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.rules[] | contains("Deserialization"))] | unique_by(.attackId) | length')"
142+
echo "PATH_TRAVERSAL_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.rules[] | contains("Path Traversal"))] | unique_by(.attackId) | length')"
143+
echo "XSS_COUNT: $(echo "$BASELINE" | jq '[.items[] | select(.rules[] | contains("Cross-Site Scripting"))] | unique_by(.attackId) | length')"
144+
145+
echo ""
146+
echo "=== TEMPORAL AND AGGREGATE METRICS ==="
147+
echo "OLDEST_ATTACK: $(echo "$BASELINE" | jq '.items | min_by(.startTimeMs) | {attackId, startTime, source}')"
148+
echo "NEWEST_ATTACK: $(echo "$BASELINE" | jq '.items | max_by(.startTimeMs) | {attackId, startTime, source}')"
149+
echo "HIGH_PROBE_ATTACK: $(echo "$BASELINE" | jq '.items | max_by(.probes) | {attackId, probes, source}')"
150+
echo "MULTI_APP_ATTACKS: $(echo "$BASELINE" | jq '[.items[] | select((.applications | length) > 1)] | length')"
151+
152+
echo ""
153+
echo "=== UNIQUE SOURCE IPS ==="
154+
echo "$BASELINE" | jq 'reduce .items[] as $item ({}; .[$item.source] += [$item.attackId])'
155+
156+
echo ""
157+
echo "=== ATTACKS WITH 1 PROBE ==="
158+
echo "$BASELINE" | jq '[.items[] | select(.probes == 1)] | .[] | {attackId, source, probes}'
159+
160+
echo ""
161+
echo "=== ATTACK WITH MOST RULES ==="
162+
echo "$BASELINE" | jq '.items | max_by(.rules | length) | {attackId, source, rules_count: (.rules | length), rules}'
163+
```
164+
118165
### Step 3: Execute Tests
119166

120167
Use the derived values as expected results for all tests below. Tests reference these values using `{METRIC_NAME}` notation.

0 commit comments

Comments
 (0)