-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstable-source-rules.json
More file actions
3713 lines (3713 loc) · 155 KB
/
Copy pathstable-source-rules.json
File metadata and controls
3713 lines (3713 loc) · 155 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"schemaVersion": 1,
"semanticDigest": "562ca6837a5994b831e5b347263ca43eca6d152df2e69939ebda10ebc10ecf69",
"counts": {
"stableTotal": 44,
"builtInRisk": 25,
"builtInIntegrity": 3,
"externalRisk": 16
},
"rules": [
{
"adapter": {
"id": "builtin-source",
"version": "1.1.1",
"maturity": "stable",
"type": "built_in"
},
"maturity": "stable",
"revision": "2",
"frameworks": [
"browser"
],
"alternatives": [
"Use a framework renderer that escapes values by default."
],
"userDecisions": [
"Confirm which markup is a product requirement and where its trust boundary belongs."
],
"id": "browser-html-injection-sink",
"kind": "risk_detection",
"family": "browser_output",
"languages": [
"javascript",
"typescript"
],
"domain": "security_exposure",
"severity": "medium",
"defaultState": "suspected",
"rationale": "browser_html_sink_lead",
"technicalTerm": "DOM-based cross-site scripting sink lead (CWE-79)",
"plainLanguage": "Browser code inserts a value as HTML instead of text. If that value came from outside the app, it can change the page or run script.",
"consequence": "A successful path may steal in-page data, perform actions as the user or present false content.",
"confidenceBoundary": "The rule finds direct innerHTML/outerHTML assignments and append assignments, insertAdjacentHTML, and document.write/document.writeln calls. It does not trace input or determine sanitization.",
"applicability": "Non-test, non-generated browser JavaScript and TypeScript source files.",
"detection": {
"type": "bounded_js_ts_tokens",
"constructs": [
"innerHTML_assignment",
"innerHTML_append_assignment",
"outerHTML_assignment",
"outerHTML_append_assignment",
"insertAdjacentHTML_call",
"document.write_call",
"document.writeln_call"
],
"taintFlow": false
},
"standards": [
{
"id": "CWE-79",
"url": "https://cwe.mitre.org/data/definitions/79.html"
},
{
"id": "OWASP-TOP10-2025-A05",
"url": "https://owasp.org/Top10/2025/A05_2025-Injection/"
}
],
"falsePositiveCauses": [
"Only a fixed trusted literal reaches the sink.",
"The value is sanitized by a policy the lexical rule cannot identify."
],
"proposal": {
"status": "review_required",
"summary": "Use textContent or DOM construction for text, or sanitize required HTML with a reviewed allowlist at the trust boundary."
},
"proposalRisks": [
"Switching from HTML to text or allowlisted DOM nodes can alter formatting."
],
"sideEffects": [
"Legacy widgets or rich content may render differently."
],
"securityRetest": "Pass a harmless HTML/script marker through the owned source and verify it is displayed as text or safely removed.",
"functionalRetest": "Exercise the affected page and compare intended text, formatting, links and interactive elements.",
"rollback": "Restore only the necessary formatting behavior if the UI regresses, while keeping untrusted markup out of executable HTML sinks.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/stable-source-rules.json",
"fixtures": {
"positive": [
{
"id": "browser-html-sink-positive",
"path": "test/fixtures/js-ts-rules/vulnerable.tsx"
}
],
"negative": [
{
"id": "browser-html-sink-safe",
"path": "test/fixtures/js-ts-rules/safe.tsx"
}
]
}
},
{
"adapter": {
"id": "checkov",
"version": "3.3.9",
"maturity": "stable",
"type": "external"
},
"maturity": "stable",
"revision": "1",
"frameworks": [
"Docker"
],
"alternatives": [
"Define and test the health probe in the deployment platform instead of the reusable image."
],
"userDecisions": [
"Confirm whether the image is a long-running service and which endpoint or local command represents real readiness."
],
"id": "checkov-dockerfile-healthcheck-missing",
"kind": "risk_detection",
"family": "deployment_configuration",
"languages": [
"dockerfile"
],
"domain": "security_exposure",
"severity": "low",
"defaultState": "suspected",
"rationale": "container_healthcheck_missing",
"technicalTerm": "Missing container health check",
"plainLanguage": "The image does not define a routine way for the container platform to tell whether the application is actually healthy.",
"consequence": "A stuck or partly started process may continue receiving traffic or remain unreplaced because the platform only knows that the process exists.",
"confidenceBoundary": "Checkov rule CKV_DOCKER_2 found no HEALTHCHECK in the Dockerfile. A deployment-level health probe may already exist and was not inspected.",
"applicability": "Files named Dockerfile scanned by caller-installed Checkov 3.3.9. Deployment manifests and platform-specific probes are outside this rule.",
"detection": {
"type": "external_policy_adapter",
"engine": "checkov",
"externalRuleId": "CKV_DOCKER_2",
"frameworks": [
"dockerfile"
],
"matchState": "suspected"
},
"standards": [
{
"id": "OWASP-TOP10-2025-A02",
"url": "https://owasp.org/Top10/2025/A02_2025-Security_Misconfiguration/"
}
],
"falsePositiveCauses": [
"The deployment manifest defines an equivalent liveness or health probe.",
"The image is a one-shot job for which a continuous health check is not appropriate."
],
"proposal": {
"status": "review_required",
"summary": "Add a lightweight health check that reflects application readiness, with reviewed interval, timeout, start period and retries."
},
"proposalRisks": [
"A probe that starts too early, depends on an optional service or times out too quickly can restart a healthy application."
],
"sideEffects": [
"Startup time, dependency availability and temporary load spikes can cause false unhealthy states or restart loops."
],
"securityRetest": "Rerun CKV_DOCKER_2 and verify the deployed platform observes the intended probe rather than only process liveness.",
"functionalRetest": "Start the service from cold state, test slow dependency startup and confirm healthy, degraded and failed states are reported as intended.",
"rollback": "Disable or relax the new probe if it restarts healthy instances, then restore monitoring while the readiness signal and timing are corrected.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/adapter-protocol.md",
"fixtures": {
"positive": [
{
"id": "checkov-healthcheck-positive",
"path": "test/fixtures/checkov-rules/vulnerable/Dockerfile"
}
],
"negative": [
{
"id": "checkov-healthcheck-safe",
"path": "test/fixtures/checkov-rules/safe/Dockerfile"
}
]
}
},
{
"adapter": {
"id": "checkov",
"version": "3.3.9",
"maturity": "stable",
"type": "external"
},
"maturity": "stable",
"revision": "1",
"frameworks": [
"Docker"
],
"alternatives": [
"Set an approved non-root UID in the deployment runtime when the image must remain reusable, and enforce that override as code."
],
"userDecisions": [
"Confirm which directories must be writable and whether the service must bind a port below 1024."
],
"id": "checkov-dockerfile-root-user",
"kind": "risk_detection",
"family": "deployment_configuration",
"languages": [
"dockerfile"
],
"domain": "security_exposure",
"severity": "medium",
"defaultState": "suspected",
"rationale": "container_runs_as_root",
"technicalTerm": "Container runs as root (CWE-250)",
"plainLanguage": "The Dockerfile leaves the final container process running with the most powerful user inside the container.",
"consequence": "If the application is compromised, root privileges can make it easier to alter container files, bind privileged ports or abuse an unsafe runtime configuration.",
"confidenceBoundary": "Checkov rule CKV_DOCKER_8 matched the Dockerfile. A runtime USER override, rootless container engine or additional isolation may reduce the deployed impact; none was verified.",
"applicability": "Files named Dockerfile scanned by caller-installed Checkov 3.3.9. Other container build files and runtime manifests are outside stable coverage.",
"detection": {
"type": "external_policy_adapter",
"engine": "checkov",
"externalRuleId": "CKV_DOCKER_8",
"frameworks": [
"dockerfile"
],
"matchState": "suspected"
},
"standards": [
{
"id": "CWE-250",
"url": "https://cwe.mitre.org/data/definitions/250.html"
},
{
"id": "OWASP-TOP10-2025-A02",
"url": "https://owasp.org/Top10/2025/A02_2025-Security_Misconfiguration/"
}
],
"falsePositiveCauses": [
"The deployment platform overrides the image user with an approved non-root UID.",
"The container needs a short root-only setup phase but the final runtime is constrained elsewhere."
],
"proposal": {
"status": "review_required",
"summary": "Create a dedicated runtime user, give it only the required files and directories, and set USER in the final image stage."
},
"proposalRisks": [
"The application may lose access to files, sockets or ports that currently depend on root ownership or privileges."
],
"sideEffects": [
"File permissions, bind-mounted volume ownership and low-numbered port binding can change; image build and startup may fail until ownership is explicit."
],
"securityRetest": "Rerun the pinned Checkov rule and inspect the built image/runtime identity to confirm the application process uses the intended non-root UID.",
"functionalRetest": "Build and start the image, exercise startup, file writes, uploads, logs, health checks and every required network port.",
"rollback": "Revert the USER and ownership change if normal startup fails, keep the deployment restricted, and identify the exact permission before proposing a narrower change.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/adapter-protocol.md",
"fixtures": {
"positive": [
{
"id": "checkov-root-user-positive",
"path": "test/fixtures/checkov-rules/vulnerable/Dockerfile"
}
],
"negative": [
{
"id": "checkov-root-user-safe",
"path": "test/fixtures/checkov-rules/safe/Dockerfile"
}
]
}
},
{
"adapter": {
"id": "checkov",
"version": "3.3.9",
"maturity": "stable",
"type": "external"
},
"maturity": "stable",
"revision": "1",
"frameworks": [
"GitHub Actions"
],
"alternatives": [
"Split publishing or deployment into a protected workflow with narrow permissions and keep build/test workflows read-only."
],
"userDecisions": [
"Confirm which jobs are allowed to publish releases, packages, attestations or deployments and which events may trigger them."
],
"id": "checkov-github-actions-write-all",
"kind": "risk_detection",
"family": "deployment_configuration",
"languages": [
"yaml"
],
"domain": "supply_chain",
"severity": "high",
"defaultState": "suspected",
"rationale": "workflow_token_write_all",
"technicalTerm": "Over-privileged GitHub Actions token (CWE-250)",
"plainLanguage": "The workflow asks GitHub for write access to every available repository permission instead of only the operations its jobs need.",
"consequence": "If a workflow step or dependency is compromised, its token may be able to change repository content, releases, packages or other protected resources.",
"confidenceBoundary": "Checkov rule CKV2_GHA_1 matched top-level permissions: write-all. Event restrictions, job-level reductions, environment protection and actual token use were not evaluated.",
"applicability": "Root .github/workflows/*.yml and *.yaml files scanned by caller-installed Checkov 3.3.9. Reusable workflows outside that path are not claimed.",
"detection": {
"type": "external_policy_adapter",
"engine": "checkov",
"externalRuleId": "CKV2_GHA_1",
"frameworks": [
"github_actions"
],
"matchState": "suspected"
},
"standards": [
{
"id": "CWE-250",
"url": "https://cwe.mitre.org/data/definitions/250.html"
},
{
"id": "OWASP-TOP10-2025-A03",
"url": "https://owasp.org/Top10/2025/A03_2025-Software_Supply_Chain_Failures/"
}
],
"falsePositiveCauses": [
"A tightly protected release workflow genuinely needs several write permissions, though write-all is still broader than necessary.",
"A reusable workflow receives an already restricted token from its caller."
],
"proposal": {
"status": "review_required",
"summary": "Set top-level permissions to read-only or none, then grant each job only the named write permissions it demonstrably uses."
},
"proposalRisks": [
"Release, package publication, deployment, pull-request comments or provenance jobs can fail when a required permission is omitted."
],
"sideEffects": [
"Existing release, publish and deploy jobs may return 403 errors until their exact contents, packages, deployments, id-token or pull-requests permissions are declared."
],
"securityRetest": "Rerun CKV2_GHA_1 and inspect the effective token permissions for every triggered job and reusable workflow boundary.",
"functionalRetest": "Run representative pull-request, branch, release, package-publish and deployment workflows in a safe test path and verify all intended writes still succeed.",
"rollback": "Restore only the specific permission required by a failing job; do not return to write-all without recording an owner, reason and review date.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/adapter-protocol.md",
"fixtures": {
"positive": [
{
"id": "checkov-write-all-positive",
"path": "test/fixtures/checkov-rules/vulnerable/.github/workflows/ci.yml"
}
],
"negative": [
{
"id": "checkov-write-all-safe",
"path": "test/fixtures/checkov-rules/safe/.github/workflows/ci.yml"
}
]
}
},
{
"adapter": {
"id": "builtin-source",
"version": "1.1.1",
"maturity": "stable",
"type": "built_in"
},
"maturity": "stable",
"revision": "1",
"frameworks": [
"express",
"cors"
],
"alternatives": [
"Use same-origin requests or token-based non-cookie calls where cross-origin sessions are unnecessary."
],
"userDecisions": [
"List the browser origins that must use credentials in each environment."
],
"id": "cors-wildcard-with-credentials",
"kind": "risk_detection",
"family": "authentication_session",
"languages": [
"javascript",
"typescript"
],
"domain": "security_exposure",
"severity": "medium",
"defaultState": "suspected",
"rationale": "credentialed_cross_origin_policy_lead",
"technicalTerm": "Credentialed wildcard CORS policy lead (CWE-942)",
"plainLanguage": "One configuration says every website may make browser requests and also asks to include user credentials. That trust boundary is too broad or internally contradictory.",
"consequence": "A permissive effective policy can let an untrusted site read authenticated responses or can break legitimate browser requests in inconsistent ways.",
"confidenceBoundary": "The rule found origin: \"*\" and credentials: true in one object. It does not prove the object configures live CORS middleware or how a framework emits headers.",
"applicability": "Non-test, non-generated JavaScript and TypeScript containing a literal credentialed wildcard policy object.",
"detection": {
"type": "bounded_js_ts_tokens",
"objectProperties": {
"origin": "*",
"credentials": true
},
"dataFlow": false
},
"standards": [
{
"id": "CWE-942",
"url": "https://cwe.mitre.org/data/definitions/942.html"
},
{
"id": "OWASP-API-2023-API8",
"url": "https://owasp.org/API-Security/editions/2023/en/0xa8-security-misconfiguration/"
}
],
"falsePositiveCauses": [
"The object is documentation or dead configuration outside excluded test paths.",
"Later middleware replaces the policy before sending a response."
],
"proposal": {
"status": "review_required",
"summary": "List the exact trusted origins and verify credentials are enabled only for endpoints that need browser sessions."
},
"proposalRisks": [
"An incomplete allowlist can block legitimate frontends, previews or local development."
],
"sideEffects": [
"Browser integrations from omitted origins will fail CORS checks."
],
"securityRetest": "Request an owned authenticated endpoint from an untrusted test origin and verify the response is not readable.",
"functionalRetest": "Run login and API journeys from every approved production, preview and development origin.",
"rollback": "Restore the last known-good explicit allowlist if clients break; do not fall back to credentialed origin reflection or a wildcard.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/stable-source-rules.json",
"fixtures": {
"positive": [
{
"id": "cors-wildcard-credentials-positive",
"path": "test/fixtures/js-ts-rules/vulnerable.tsx"
}
],
"negative": [
{
"id": "cors-wildcard-credentials-safe",
"path": "test/fixtures/js-ts-rules/safe.tsx"
}
]
}
},
{
"adapter": {
"id": "builtin-source",
"version": "1.1.1",
"maturity": "stable",
"type": "built_in"
},
"maturity": "stable",
"revision": "1",
"frameworks": [],
"alternatives": [
"Record and verify an equivalent immutable dependency resolution artifact in CI."
],
"userDecisions": [
"Confirm which package manager and lockfile CI and production must use."
],
"id": "dependency-lockfile-missing",
"kind": "risk_detection",
"family": "dependency_configuration",
"languages": [
"javascript",
"typescript",
"python"
],
"domain": "supply_chain",
"severity": "low",
"defaultState": "confirmed",
"rationale": "dependency_reproducibility",
"technicalTerm": "Missing dependency lockfile",
"plainLanguage": "The project names its dependencies but does not record the exact versions used to build it.",
"consequence": "A later install can select different package versions, making security review and repeatable deployment less reliable.",
"confidenceBoundary": "The rule confirms that a supported manifest has no adjacent or applicable workspace lockfile. It does not prove a malicious dependency or exploitable vulnerability.",
"applicability": "Supported package.json or pyproject.toml project roots, including declared JavaScript workspaces.",
"detection": {
"type": "manifest_lockfile_adjacency",
"manifests": [
"package.json",
"pyproject.toml"
],
"workspaceAware": true
},
"standards": [
{
"id": "NIST-SSDF-1.1-PS.3.2",
"url": "https://csrc.nist.gov/pubs/sp/800/218/final"
}
],
"falsePositiveCauses": [
"A lockfile is generated only in a deployment system outside the audited source.",
"An unsupported package manager records resolution in another file."
],
"proposal": {
"status": "ready_for_review",
"summary": "Generate and commit the lockfile used by CI and deployment."
},
"proposalRisks": [
"A newly generated lockfile can select versions that differ from the current deployment."
],
"sideEffects": [
"Dependency versions or transitive packages may change when the first lockfile is generated."
],
"securityRetest": "Rerun the source audit and confirm the manifest is covered by a supported lockfile.",
"functionalRetest": "Run the normal install, build and project test commands using the committed lockfile.",
"rollback": "Revert the lockfile if the locked install or application tests regress, then reconcile the deployed dependency set before regenerating it.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/stable-source-rules.json",
"fixtures": {
"positive": [
{
"id": "manifest-without-lock",
"path": "test/fixtures/audit-app/package.json"
}
],
"negative": [
{
"id": "manifest-with-lock",
"path": "test/fixtures/next-app/pnpm-lock.yaml"
}
]
}
},
{
"adapter": {
"id": "gitleaks",
"version": "8.30.1",
"maturity": "stable",
"type": "external"
},
"maturity": "stable",
"revision": "2",
"frameworks": [],
"alternatives": [
"Use an approved narrow Gitleaks suppression for a proven non-secret fixture."
],
"userDecisions": [
"Confirm whether the match is a live credential and whether repository history may be rewritten."
],
"id": "gitleaks-committed-secret",
"kind": "risk_detection",
"family": "secret_management",
"languages": [
"any"
],
"domain": "supply_chain",
"severity": "high",
"defaultState": "suspected",
"rationale": "committed_secret_material",
"technicalTerm": "Committed secret-pattern lead",
"plainLanguage": "A pinned Gitleaks rule matched secret-shaped material in Git history.",
"consequence": "If the value is a live credential, anyone with repository history access may be able to use it.",
"confidenceBoundary": "The match and redacted fingerprint are recorded. Credential validity, exposure and authorization are not tested.",
"applicability": "A Git worktree with the caller-installed tested Gitleaks version.",
"detection": {
"type": "external_adapter",
"command": "gitleaks git --report-format json",
"matchState": "suspected"
},
"standards": [
{
"id": "CWE-798",
"url": "https://cwe.mitre.org/data/definitions/798.html"
}
],
"falsePositiveCauses": [
"A test or revoked value matches a secret pattern.",
"A generated example intentionally resembles a credential."
],
"proposal": {
"status": "review_required",
"summary": "Validate privately, revoke any live credential and remove it from current and historical source where appropriate."
},
"proposalRisks": [
"History rewriting disrupts existing clones and references."
],
"sideEffects": [
"Credential rotation can interrupt services; history rewriting requires repository coordination."
],
"securityRetest": "Rerun the pinned Gitleaks history scan and confirm the fingerprint is absent or covered by an approved suppression.",
"functionalRetest": "Verify every service using a rotated credential can authenticate and complete its normal health check.",
"rollback": "Do not reactivate a leaked credential; roll back application configuration to a separately issued valid credential if rotation breaks service.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/adapter-protocol.md",
"fixtures": {
"positive": [
{
"id": "gitleaks-redacted-lead",
"path": "test/external-adapters.test.mjs"
}
],
"negative": [
{
"id": "gitleaks-clean-output",
"path": "test/real-adapters.test.mjs"
}
]
}
},
{
"adapter": {
"id": "gitleaks",
"version": "8.30.1",
"maturity": "stable",
"type": "external"
},
"maturity": "stable",
"revision": "2",
"frameworks": [],
"alternatives": [
"Use an approved narrow suppression for a proven non-secret fixture."
],
"userDecisions": [
"Confirm whether the match is live and which secret store should replace it."
],
"id": "gitleaks-working-tree-secret",
"kind": "risk_detection",
"family": "secret_management",
"languages": [
"any"
],
"domain": "supply_chain",
"severity": "high",
"defaultState": "suspected",
"rationale": "working_tree_secret_material",
"technicalTerm": "Working-tree secret-pattern lead",
"plainLanguage": "A pinned Gitleaks rule matched secret-shaped material in the current files.",
"consequence": "If the value is live and later committed, built or shared, it may grant unauthorized access.",
"confidenceBoundary": "The match and redacted fingerprint are recorded. Credential validity and distribution are not tested.",
"applicability": "A readable project directory with the caller-installed tested Gitleaks version.",
"detection": {
"type": "external_adapter",
"command": "gitleaks dir --report-format json",
"matchState": "suspected"
},
"standards": [
{
"id": "CWE-798",
"url": "https://cwe.mitre.org/data/definitions/798.html"
}
],
"falsePositiveCauses": [
"A placeholder or test value matches a secret pattern.",
"A local ignored file contains intentionally non-production data."
],
"proposal": {
"status": "review_required",
"summary": "Validate privately, revoke any live credential and remove it from source and build inputs."
},
"proposalRisks": [
"Credential rotation can interrupt dependent services."
],
"sideEffects": [
"Local development and CI need a replacement secret-injection path."
],
"securityRetest": "Rerun the pinned Gitleaks directory scan and confirm the fingerprint is absent or approved.",
"functionalRetest": "Run dependent service authentication and the project tests with replacement credentials.",
"rollback": "Do not restore a leaked value; use a separately issued credential if the replacement fails.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/adapter-protocol.md",
"fixtures": {
"positive": [
{
"id": "gitleaks-working-tree-lead",
"path": "test/external-adapters.test.mjs"
}
],
"negative": [
{
"id": "gitleaks-clean-directory",
"path": "test/real-adapters.test.mjs"
}
]
}
},
{
"adapter": {
"id": "builtin-source",
"version": "1.1.1",
"maturity": "stable",
"type": "built_in"
},
"maturity": "stable",
"revision": "1",
"frameworks": [
"node.js"
],
"alternatives": [
"Use an asymmetric signing key from a managed KMS when the architecture supports it."
],
"userDecisions": [
"Confirm whether the literal is deployed, which consumers share it and whether planned mass reauthentication is acceptable."
],
"id": "hardcoded-auth-secret",
"kind": "risk_detection",
"family": "secret_management",
"languages": [
"javascript",
"typescript"
],
"domain": "security_exposure",
"severity": "high",
"defaultState": "suspected",
"rationale": "hardcoded_authentication_secret_lead",
"technicalTerm": "Hard-coded authentication secret lead (CWE-798)",
"plainLanguage": "A variable named like an authentication, session, JWT or cookie secret contains a fixed value in source code.",
"consequence": "Anyone who can read the source or artifact may forge tokens or sessions if the value is real and deployed.",
"confidenceBoundary": "The rule found a security-named assignment to a non-placeholder literal of at least 12 characters. It records only a length band; validity, history and deployment use are not tested.",
"applicability": "Non-test, non-generated JavaScript and TypeScript with narrowly recognized authentication-secret variable names.",
"detection": {
"type": "bounded_js_ts_tokens",
"securityNames": [
"jwtSecret",
"sessionSecret",
"authSecret",
"cookieSecret"
],
"minimumLiteralLength": 12,
"literalOutput": "redacted_length_band"
},
"standards": [
{
"id": "CWE-798",
"url": "https://cwe.mitre.org/data/definitions/798.html"
},
{
"id": "OWASP-TOP10-2025-A07",
"url": "https://owasp.org/Top10/2025/A07_2025-Authentication_Failures/"
}
],
"falsePositiveCauses": [
"The value is a deliberately fake fixture outside conventional test paths.",
"The constant is never used as an authentication secret."
],
"proposal": {
"status": "review_required",
"summary": "Validate privately, rotate any deployed value, inject the replacement from a secret store and remove it from source history where required."
},
"proposalRisks": [
"Rotating a signing or session secret can invalidate every active token or session."
],
"sideEffects": [
"Users may be signed out and services using the old secret may fail until coordinated."
],
"securityRetest": "Rerun source and secret scans, verify the old key cannot authenticate, and confirm no report prints the value.",
"functionalRetest": "Run login, token issuance, refresh, cross-service verification and logout using the new secret source.",
"rollback": "Do not reactivate a disclosed secret; roll back application configuration only to a separately issued valid key if the new rollout fails.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/stable-source-rules.json",
"fixtures": {
"positive": [
{
"id": "hardcoded-auth-secret-positive",
"path": "test/fixtures/js-ts-rules/vulnerable.tsx"
}
],
"negative": [
{
"id": "hardcoded-auth-secret-safe",
"path": "test/fixtures/js-ts-rules/safe.tsx"
}
]
}
},
{
"adapter": {
"id": "builtin-source",
"version": "1.1.1",
"maturity": "stable",
"type": "built_in"
},
"maturity": "stable",
"revision": "1",
"frameworks": [
"node.js",
"browser"
],
"alternatives": [
"Isolate a required evaluator behind a strict allowlist and process boundary with no secrets or ambient privileges."
],
"userDecisions": [
"Confirm whether dynamic expressions are a product requirement and who controls their source."
],
"id": "js-dynamic-code-execution",
"kind": "risk_detection",
"family": "injection_execution",
"languages": [
"javascript",
"typescript"
],
"domain": "security_exposure",
"severity": "high",
"defaultState": "suspected",
"rationale": "dynamic_code_execution_lead",
"technicalTerm": "Dynamic code execution lead (CWE-95)",
"plainLanguage": "The application turns runtime text into JavaScript instructions. If an attacker can affect that text, it can become code execution.",
"consequence": "A reachable attacker-controlled value may run commands in the browser or with the server process permissions.",
"confidenceBoundary": "The rule found a direct eval call or new Function constructor after masking comments and literals. It does not prove untrusted input reaches the argument or that the path runs.",
"applicability": "Non-test, non-generated JavaScript and TypeScript source files up to the configured file-size limit.",
"detection": {
"type": "bounded_js_ts_tokens",
"constructs": [
"eval_call",
"new_function_constructor"
],
"taintFlow": false
},
"standards": [
{
"id": "CWE-95",
"url": "https://cwe.mitre.org/data/definitions/95.html"
},
{
"id": "OWASP-TOP10-2025-A05",
"url": "https://owasp.org/Top10/2025/A05_2025-Injection/"
}
],
"falsePositiveCauses": [
"The argument is a constant controlled entirely by the application.",
"The code is unreachable in the deployed build."
],
"proposal": {
"status": "review_required",
"summary": "Replace dynamic evaluation with an explicit parser, lookup table or bounded expression library after tracing the argument source."
},
"proposalRisks": [
"Replacing an evaluator can change accepted expressions or plugin behavior."
],
"sideEffects": [
"Dynamic rules, templates or plugins may stop accepting previously valid input."
],
"securityRetest": "Rerun the source audit and test that an untrusted expression is treated as data and cannot execute JavaScript.",
"functionalRetest": "Run the product journey that uses expressions, templates or plugins with representative valid inputs.",
"rollback": "Revert the parser integration if supported inputs regress, but keep the evaluator unreachable from untrusted input while selecting a compatible replacement.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/stable-source-rules.json",
"fixtures": {
"positive": [
{
"id": "js-dynamic-execution-positive",
"path": "test/fixtures/js-ts-rules/vulnerable.tsx"
}
],
"negative": [
{
"id": "js-dynamic-execution-safe",
"path": "test/fixtures/js-ts-rules/safe.tsx"
}
]
}
},
{
"adapter": {
"id": "builtin-source",
"version": "1.1.1",
"maturity": "stable",
"type": "built_in"
},
"maturity": "stable",
"revision": "1",
"frameworks": [
"Express Session",
"NextAuth",
"Auth.js",
"NestJS JWT"
],
"alternatives": [
"Use managed asymmetric signing keys when token consumers and rotation requirements support them."
],
"userDecisions": [
"Confirm whether the literal is deployed, which services share it and whether mass reauthentication is acceptable."
],
"id": "js-inline-session-secret",
"kind": "risk_detection",
"family": "secret_management",
"languages": [
"javascript",
"typescript"
],
"domain": "security_exposure",
"severity": "high",
"defaultState": "suspected",
"rationale": "inline_framework_session_secret_lead",
"technicalTerm": "Inline session or JWT signing secret lead (CWE-798)",
"plainLanguage": "A recognized session or token library receives its signing secret as fixed text in source code.",
"consequence": "If the value is real and deployed, source or artifact readers may be able to forge sessions or tokens.",
"confidenceBoundary": "The bounded rule resolves a supported framework configuration and records only the literal length band. It does not retain the value or prove validity, deployment use or exposure.",
"applicability": "Direct Express Session, NextAuth/Auth.js configuration calls and NestJS JwtModule.register option objects in non-test JavaScript or TypeScript.",
"detection": {
"type": "bounded_js_ts_tokens",
"resolvedModules": [
"express-session",
"next-auth",
"@auth/core",
"@nestjs/jwt"
],
"property": "secret",
"minimumLiteralLength": 12,
"literalOutput": "redacted_length_band"
},
"standards": [
{
"id": "CWE-798",
"url": "https://cwe.mitre.org/data/definitions/798.html"
},
{
"id": "OWASP-TOP10-2025-A07",
"url": "https://owasp.org/Top10/2025/A07_2025-Authentication_Failures/"
}
],
"falsePositiveCauses": [
"The value is a deliberately fake development constant outside conventional fixture paths.",
"A later runtime configuration replaces the literal before any signing operation."
],
"proposal": {
"status": "review_required",
"summary": "Validate privately, rotate any deployed value and inject the replacement from a protected secret source."
},
"proposalRisks": [
"Rotating the secret can invalidate active sessions or tokens across every application instance."
],
"sideEffects": [
"Users may be signed out and services sharing the old key may fail until rollout is coordinated."
],
"securityRetest": "Rerun source and secret scans, verify the old key cannot authenticate and confirm reports contain no literal value.",
"functionalRetest": "Run login, session continuity, token issuance, refresh, verification and logout through every service using the key.",
"rollback": "Do not reactivate a disclosed value; switch to a separately issued fallback key if the new rollout fails.",
"helpUri": "https://github.com/parousia8888/web-app-security-skill/blob/main/docs/stable-source-rules.json",
"fixtures": {
"positive": [
{
"id": "js-inline-session-secret-positive",
"path": "test/fixtures/js-ts-rules/vulnerable.tsx"
}
],
"negative": [
{
"id": "js-inline-session-secret-safe",
"path": "test/fixtures/js-ts-rules/safe.tsx"
}
]
}
},
{
"adapter": {
"id": "builtin-source",
"version": "1.1.1",
"maturity": "stable",
"type": "built_in"
},
"maturity": "stable",
"revision": "1",
"frameworks": [
"Express",
"Express Session",
"NextAuth",
"cookies-next",
"cookie"
],
"alternatives": [
"Use a separate non-sensitive browser-readable cookie while keeping authentication state in an HttpOnly Secure cookie."
],
"userDecisions": [
"Confirm which cookie carries authentication state, whether browser JavaScript must read it and where HTTPS terminates."
],
"id": "js-insecure-cookie-options",
"kind": "risk_detection",
"family": "authentication_session",
"languages": [
"javascript",
"typescript"
],
"domain": "security_exposure",
"severity": "medium",
"defaultState": "suspected",
"rationale": "explicit_insecure_session_cookie_option",
"technicalTerm": "Explicitly insecure session-cookie option (CWE-614/CWE-1004)",
"plainLanguage": "A recognized cookie or session API explicitly turns off browser protection that keeps the cookie on HTTPS or away from JavaScript.",
"consequence": "Depending on the disabled flag, a session cookie may travel over an unencrypted connection or become easier to steal through browser script injection.",
"confidenceBoundary": "The rule observes httpOnly:false or secure:false in a supported API option object. It does not infer missing flags, cookie purpose, effective proxy TLS or deployed middleware behavior.",
"applicability": "Direct supported JavaScript/TypeScript session and cookie API calls with explicit option literals.",
"detection": {
"type": "bounded_js_ts_tokens",
"resolvedModules": [
"express-session",
"next-auth",
"@auth/core",
"cookie",
"cookies-next"
],
"explicitProperties": {
"httpOnly": false,
"secure": false
},
"inferMissing": false
},
"standards": [
{
"id": "CWE-614",
"url": "https://cwe.mitre.org/data/definitions/614.html"
},
{
"id": "CWE-1004",
"url": "https://cwe.mitre.org/data/definitions/1004.html"
},
{
"id": "OWASP-TOP10-2025-A07",
"url": "https://owasp.org/Top10/2025/A07_2025-Authentication_Failures/"
}
],