@runsec/mcp 1.0.35 → 1.0.37
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/dist/data/.rag-cache.json +1 -0
- package/dist/data/skills/_exploit_overrides.json +16 -0
- package/dist/data/skills/advanced-agent-cloud/index.md +94 -0
- package/dist/data/skills/advanced-agent-cloud/patterns.md +46 -0
- package/dist/data/skills/advanced-agent-cloud/skill.json +38 -0
- package/dist/data/skills/app-logic/index.md +69 -0
- package/dist/data/skills/app-logic/patterns.md +23 -0
- package/dist/data/skills/app-logic/skill.json +24 -0
- package/dist/data/skills/auth-keycloak/index.md +69 -0
- package/dist/data/skills/auth-keycloak/patterns.md +46 -0
- package/dist/data/skills/auth-keycloak/skill.json +51 -0
- package/dist/data/skills/browser-agent/index.md +58 -0
- package/dist/data/skills/browser-agent/patterns.md +15 -0
- package/dist/data/skills/browser-agent/skill.json +24 -0
- package/dist/data/skills/cloud-secrets/index.md +66 -0
- package/dist/data/skills/cloud-secrets/patterns.md +19 -0
- package/dist/data/skills/cloud-secrets/skill.json +28 -0
- package/dist/data/skills/csharp-dotnet/index.md +103 -0
- package/dist/data/skills/csharp-dotnet/patterns.md +270 -0
- package/dist/data/skills/csharp-dotnet/skill.json +27 -0
- package/dist/data/skills/desktop-vsto-suite/index.md +202 -0
- package/dist/data/skills/desktop-vsto-suite/patterns.md +154 -0
- package/dist/data/skills/desktop-vsto-suite/skill.json +26 -0
- package/dist/data/skills/devops-security/index.md +64 -0
- package/dist/data/skills/devops-security/patterns.md +23 -0
- package/dist/data/skills/devops-security/skill.json +42 -0
- package/dist/data/skills/domain-access-management/index.md +123 -0
- package/dist/data/skills/domain-access-management/patterns.md +58 -0
- package/dist/data/skills/domain-access-management/skill.json +36 -0
- package/dist/data/skills/domain-data-privacy/index.md +98 -0
- package/dist/data/skills/domain-data-privacy/patterns.md +48 -0
- package/dist/data/skills/domain-data-privacy/skill.json +36 -0
- package/dist/data/skills/domain-input-validation/index.md +210 -0
- package/dist/data/skills/domain-input-validation/patterns.md +158 -0
- package/dist/data/skills/domain-input-validation/skill.json +24 -0
- package/dist/data/skills/domain-platform-hardening/index.md +169 -0
- package/dist/data/skills/domain-platform-hardening/patterns.md +96 -0
- package/dist/data/skills/domain-platform-hardening/skill.json +27 -0
- package/dist/data/skills/ds-ml-security/patterns.md +137 -0
- package/dist/data/skills/fastapi-async/index.md +83 -0
- package/dist/data/skills/fastapi-async/patterns.md +329 -0
- package/dist/data/skills/fastapi-async/skill.json +32 -0
- package/dist/data/skills/frontend-react/index.md +26 -0
- package/dist/data/skills/frontend-react/patterns.md +226 -0
- package/dist/data/skills/frontend-react/skill.json +24 -0
- package/dist/data/skills/go-core/index.md +86 -0
- package/dist/data/skills/go-core/patterns.md +272 -0
- package/dist/data/skills/go-core/skill.json +22 -0
- package/dist/data/skills/hft-cpp-security/patterns.md +37 -0
- package/dist/data/skills/index.md +73 -0
- package/dist/data/skills/infra-k8s-helm/index.md +138 -0
- package/dist/data/skills/infra-k8s-helm/patterns.md +279 -0
- package/dist/data/skills/infra-k8s-helm/skill.json +41 -0
- package/dist/data/skills/integration-security/index.md +73 -0
- package/dist/data/skills/integration-security/patterns.md +132 -0
- package/dist/data/skills/integration-security/skill.json +30 -0
- package/dist/data/skills/java-enterprise/index.md +31 -0
- package/dist/data/skills/java-enterprise/patterns.md +816 -0
- package/dist/data/skills/java-enterprise/skill.json +26 -0
- package/dist/data/skills/java-spring/index.md +65 -0
- package/dist/data/skills/java-spring/patterns.md +22 -0
- package/dist/data/skills/java-spring/skill.json +23 -0
- package/dist/data/skills/license-compliance/index.md +58 -0
- package/dist/data/skills/license-compliance/patterns.md +12 -0
- package/dist/data/skills/license-compliance/skill.json +28 -0
- package/dist/data/skills/mobile-security/patterns.md +42 -0
- package/dist/data/skills/nodejs-nestjs/index.md +71 -0
- package/dist/data/skills/nodejs-nestjs/patterns.md +288 -0
- package/dist/data/skills/nodejs-nestjs/skill.json +24 -0
- package/dist/data/skills/observability/index.md +68 -0
- package/dist/data/skills/observability/patterns.md +22 -0
- package/dist/data/skills/observability/skill.json +26 -0
- package/dist/data/skills/php-security/patterns.md +202 -0
- package/dist/data/skills/ru-regulatory/index.md +72 -0
- package/dist/data/skills/ru-regulatory/patterns.md +28 -0
- package/dist/data/skills/ru-regulatory/skill.json +53 -0
- package/dist/data/skills/ruby-rails/index.md +65 -0
- package/dist/data/skills/ruby-rails/patterns.md +172 -0
- package/dist/data/skills/ruby-rails/skill.json +24 -0
- package/dist/data/skills/rust-security/patterns.md +152 -0
- package/dist/data/trufflehog-config.yaml +407 -0
- package/dist/index.js +3766 -372
- package/package.json +1 -1
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
| ID | Название метрики | Anti-Pattern (Vulnerable Code/YAML) | Safe-Pattern (Remediation) | Stack | Источник fix_template | Exploit scenario |
|
|
2
|
+
|---|---|---|---|---|---|---|
|
|
3
|
+
| RSX-001 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
4
|
+
| RSX-002 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
5
|
+
| RSX-003 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
6
|
+
| RSX-004 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
7
|
+
| RSX-005 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
8
|
+
| RSX-006 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
9
|
+
| RSX-007 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
10
|
+
| RSX-008 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
11
|
+
| RSX-009 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
12
|
+
| RSX-010 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
13
|
+
| RSX-011 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
14
|
+
| RSX-012 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
15
|
+
| RSX-013 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
16
|
+
| RSX-014 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
17
|
+
| RSX-015 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
18
|
+
| RSX-016 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
19
|
+
| RSX-017 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
20
|
+
| RSX-018 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
21
|
+
| RSX-019 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
22
|
+
| RSX-020 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
23
|
+
| RSX-021 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
24
|
+
| RSX-022 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
25
|
+
| RSX-023 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
26
|
+
| RSX-024 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
27
|
+
| RSX-025 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
28
|
+
| RSX-026 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
29
|
+
| RSX-027 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
30
|
+
| RSX-028 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
31
|
+
| RSX-029 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
32
|
+
| RSX-030 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
33
|
+
| RSX-031 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
34
|
+
| RSX-032 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
35
|
+
| RSX-033 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
36
|
+
| RSX-034 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
37
|
+
| RSX-035 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
38
|
+
| RSX-036 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
39
|
+
| RSX-037 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
40
|
+
| RSX-038 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
41
|
+
| RSX-039 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
42
|
+
| RSX-040 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
43
|
+
| RSX-041 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
44
|
+
| RSX-042 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
45
|
+
| RSX-043 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
46
|
+
| RSX-044 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
47
|
+
| RSX-045 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
48
|
+
| RSX-046 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
49
|
+
| RSX-047 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
50
|
+
| RSX-048 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
51
|
+
| RSX-049 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
52
|
+
| RSX-050 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
53
|
+
| RSX-051 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
54
|
+
| RSX-052 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
55
|
+
| RSX-053 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
56
|
+
| RSX-054 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
57
|
+
| RSX-055 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
58
|
+
| RSX-056 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
59
|
+
| RSX-057 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
60
|
+
| RSX-058 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
61
|
+
| RSX-059 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
62
|
+
| RSX-060 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
63
|
+
| RSX-061 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
64
|
+
| RSX-062 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
65
|
+
| RSX-063 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
66
|
+
| RSX-064 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
67
|
+
| RSX-065 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
68
|
+
| RSX-066 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
69
|
+
| RSX-067 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
70
|
+
| RSX-068 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
71
|
+
| RSX-069 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
72
|
+
| RSX-070 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
73
|
+
| RSX-071 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
74
|
+
| RSX-072 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
75
|
+
| RSX-073 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
76
|
+
| RSX-074 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
77
|
+
| RSX-075 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
78
|
+
| RSX-076 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
79
|
+
| RSX-077 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
80
|
+
| RSX-078 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
81
|
+
| RSX-079 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
82
|
+
| RSX-080 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
83
|
+
| RSX-081 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
84
|
+
| RSX-082 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
85
|
+
| RSX-083 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
86
|
+
| RSX-084 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
87
|
+
| RSX-085 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
88
|
+
| RSX-086 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
89
|
+
| RSX-087 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
90
|
+
| RSX-088 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
91
|
+
| RSX-089 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
92
|
+
| RSX-090 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
93
|
+
| RSX-091 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
94
|
+
| RSX-092 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
95
|
+
| RSX-093 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
96
|
+
| RSX-094 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
97
|
+
| RSX-095 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
98
|
+
| RSX-096 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
99
|
+
| RSX-097 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
100
|
+
| RSX-098 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
101
|
+
| RSX-099 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
102
|
+
| RSX-100 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
103
|
+
| RSX-101 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
104
|
+
| RSX-102 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
105
|
+
| RSX-103 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
106
|
+
| RSX-104 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
107
|
+
| RSX-105 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
108
|
+
| RSX-106 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
109
|
+
| RSX-107 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
110
|
+
| RSX-108 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
111
|
+
| RSX-109 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
112
|
+
| RSX-110 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
113
|
+
| RSX-111 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
114
|
+
| RSX-112 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
115
|
+
| RSX-113 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
116
|
+
| RSX-114 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
117
|
+
| RSX-115 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
118
|
+
| RSX-116 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
119
|
+
| RSX-117 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
120
|
+
| RSX-118 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
121
|
+
| RSX-119 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
122
|
+
| RSX-120 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
123
|
+
| RSX-121 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
124
|
+
| RSX-122 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
125
|
+
| RSX-123 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
126
|
+
| RSX-124 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
127
|
+
| RSX-125 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
128
|
+
| RSX-126 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
129
|
+
| RSX-127 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
130
|
+
| RSX-128 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
131
|
+
| RSX-129 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
132
|
+
| RSX-130 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
133
|
+
| RSX-131 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
134
|
+
| RSX-132 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
135
|
+
| RSX-133 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
136
|
+
| RSX-134 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
137
|
+
| RSX-135 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
138
|
+
| RSX-136 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
139
|
+
| RSX-137 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
140
|
+
| RSX-138 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
141
|
+
| RSX-139 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
142
|
+
| RSX-140 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
143
|
+
| RSX-141 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
144
|
+
| RSX-142 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
145
|
+
| RSX-143 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
146
|
+
| RSX-144 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
147
|
+
| RSX-145 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
148
|
+
| RSX-146 | Rust unsafe pointer dereference without invariant guard | `unsafe { *ptr = value; }` | `if let Some(p) = NonNull::new(ptr) { unsafe { *p.as_ptr() = value; } }` | Rust | CWE-119 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked unsafe pointer access can cause undefined behavior and memory corruption. |
|
|
149
|
+
| RSX-147 | Rust async resource leak on early return | `let conn = pool.get().await?; if bad { return Ok(()); }` | `let conn = pool.get().await?; if bad { drop(conn); return Ok(()); }` | Rust | CWE-772 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Leaked async resources accumulate and degrade service availability. |
|
|
150
|
+
| RSX-148 | Rust integer overflow in release arithmetic | `let total = price * quantity;` | `let total = price.checked_mul(quantity).ok_or(Error::Overflow)?;` | Rust | CWE-190 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unchecked arithmetic overflows can break business logic and risk funds integrity. |
|
|
151
|
+
| RSX-149 | Rust unsafe transmute across incompatible types | `let out: Target = unsafe { std::mem::transmute(input) };` | `let out = Target::try_from(input)?;` | Rust | CWE-704 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Type punning via transmute may break layout assumptions and trigger UB. |
|
|
152
|
+
| RSX-150 | Rust shared mutable state without synchronization (Logic: strong) | `static mut COUNTER: u64 = 0; unsafe { COUNTER += 1; }` | `static COUNTER: AtomicU64 = AtomicU64::new(0); COUNTER.fetch_add(1, Ordering::SeqCst);` | Rust | CWE-362 | Autofix: replace unsafe math/memory/state operations with checked and synchronized primitives. | Unsynchronized mutable state causes races and nondeterministic state corruption. |
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
# trufflehog-custom-detectors.yaml
|
|
2
|
+
# Custom detectors for TruffleHog v3.x
|
|
3
|
+
# Соответствует gitleaks.rules.toml (MOEX Gitleaks high-confidence config)
|
|
4
|
+
# RU-specific tokens + инфраструктура (Vault, Atlassian, Grafana, Nexus/NPM, Elastic, 1C, Kafka)
|
|
5
|
+
#
|
|
6
|
+
# Синхронизация с gitleaks: при добавлении правил в gitleaks.rules.toml добавлять
|
|
7
|
+
# соответствующие детекторы сюда (те же regex/keywords, формат YAML).
|
|
8
|
+
#
|
|
9
|
+
# Usage: trufflehog git file:///path/to/repo --config=./trufflehog-custom-detectors.yaml --json
|
|
10
|
+
|
|
11
|
+
detectors:
|
|
12
|
+
# ============================================================================
|
|
13
|
+
# RU-SPECIFIC / LOCAL TOKENS
|
|
14
|
+
# ============================================================================
|
|
15
|
+
|
|
16
|
+
- name: Telegram Bot Token
|
|
17
|
+
keywords:
|
|
18
|
+
- telegram
|
|
19
|
+
- bot
|
|
20
|
+
regex:
|
|
21
|
+
pattern: '\d{8,10}:A[0-9A-Za-z_\-]{33}'
|
|
22
|
+
|
|
23
|
+
- name: VK Access Token
|
|
24
|
+
keywords:
|
|
25
|
+
- vk1.a
|
|
26
|
+
regex:
|
|
27
|
+
pattern: 'vk1\.a\.[0-9A-Za-z_\-]{20,}'
|
|
28
|
+
|
|
29
|
+
- name: Yandex OAuth Token
|
|
30
|
+
keywords:
|
|
31
|
+
- y0_
|
|
32
|
+
regex:
|
|
33
|
+
pattern: 'y0_[0-9A-Za-z_\-]{20,}'
|
|
34
|
+
|
|
35
|
+
- name: Yandex Cloud Service Token
|
|
36
|
+
keywords:
|
|
37
|
+
- yandex-cloud-token
|
|
38
|
+
- yc-iam-token
|
|
39
|
+
- yandex-service-token
|
|
40
|
+
regex:
|
|
41
|
+
pattern: '(?i)(yandex[_-]?cloud[_-]?token|yc[_-]?iam[_-]?token|yandex[_-]?service[_-]?token)\s*[:=]\s*[''"]?[A-Za-z0-9_\-]{40,}[''"]?'
|
|
42
|
+
|
|
43
|
+
- name: Yandex 360 API Token
|
|
44
|
+
keywords:
|
|
45
|
+
- yandex-360-token
|
|
46
|
+
- y360-api-token
|
|
47
|
+
regex:
|
|
48
|
+
pattern: '(?i)(yandex[_-]?360[_-]?token|y360[_-]?api[_-]?token)\s*[:=]\s*[''"]?[A-Za-z0-9_\-]{32,}[''"]?'
|
|
49
|
+
|
|
50
|
+
- name: VK Cloud API Token
|
|
51
|
+
keywords:
|
|
52
|
+
- vk-cloud-token
|
|
53
|
+
- vcloud-api-token
|
|
54
|
+
regex:
|
|
55
|
+
pattern: '(?i)(vk[_-]?cloud[_-]?token|vcloud[_-]?api[_-]?token)\s*[:=]\s*[''"]?[A-Za-z0-9_\-]{40,}[''"]?'
|
|
56
|
+
|
|
57
|
+
- name: VK OAuth Token
|
|
58
|
+
keywords:
|
|
59
|
+
- vk-oauth-token
|
|
60
|
+
- vk-access-token
|
|
61
|
+
regex:
|
|
62
|
+
pattern: '(?i)(vk[_-]?oauth[_-]?token|vk[_-]?access[_-]?token)\s*[:=]\s*[''"]?[A-Za-z0-9_\-]{20,}[''"]?'
|
|
63
|
+
|
|
64
|
+
- name: SberCloud API Token
|
|
65
|
+
keywords:
|
|
66
|
+
- sbercloud-token
|
|
67
|
+
- sber-cloud-api-token
|
|
68
|
+
regex:
|
|
69
|
+
pattern: '(?i)(sbercloud[_-]?token|sber[_-]?cloud[_-]?api[_-]?token)\s*[:=]\s*[''"]?[A-Za-z0-9_\-]{40,}[''"]?'
|
|
70
|
+
|
|
71
|
+
- name: 1C HTTP API Token
|
|
72
|
+
keywords:
|
|
73
|
+
- 1c-api-token
|
|
74
|
+
- 1c-http-auth
|
|
75
|
+
- 1c-basic-auth
|
|
76
|
+
regex:
|
|
77
|
+
pattern: '(?i)(1c[_-]?api[_-]?token|1c[_-]?http[_-]?auth|1c[_-]?basic[_-]?auth)\s*[:=]\s*[''"]?[A-Za-z0-9_\-+/=]{20,}[''"]?'
|
|
78
|
+
|
|
79
|
+
- name: Bitrix24 REST Token
|
|
80
|
+
keywords:
|
|
81
|
+
- bitrix24-token
|
|
82
|
+
- bitrix-rest-token
|
|
83
|
+
- bx24-token
|
|
84
|
+
regex:
|
|
85
|
+
pattern: '(?i)(bitrix24[_-]?token|bitrix[_-]?rest[_-]?token|bx24[_-]?token)\s*[:=]\s*[''"]?[A-Za-z0-9]{32,}[''"]?'
|
|
86
|
+
|
|
87
|
+
# ============================================================================
|
|
88
|
+
# CREDENTIALS IN URL (BASIC AUTH)
|
|
89
|
+
# ============================================================================
|
|
90
|
+
|
|
91
|
+
- name: Basic Auth URL
|
|
92
|
+
keywords:
|
|
93
|
+
- http://
|
|
94
|
+
- https://
|
|
95
|
+
regex:
|
|
96
|
+
pattern: 'https?:\/\/[^:\s\/]+:[^@\s\/]+@[^\/\s''"]+'
|
|
97
|
+
|
|
98
|
+
# ============================================================================
|
|
99
|
+
# DATABASE CONNECTION STRINGS (RU-STACK)
|
|
100
|
+
# ============================================================================
|
|
101
|
+
|
|
102
|
+
- name: Database Connection String
|
|
103
|
+
keywords:
|
|
104
|
+
- postgres://
|
|
105
|
+
- postgresql://
|
|
106
|
+
- mysql://
|
|
107
|
+
- mariadb://
|
|
108
|
+
- mongodb://
|
|
109
|
+
- clickhouse://
|
|
110
|
+
- redis://
|
|
111
|
+
- rediss://
|
|
112
|
+
- jdbc:postgresql://
|
|
113
|
+
- jdbc:mysql://
|
|
114
|
+
regex:
|
|
115
|
+
pattern: '(?i)(jdbc:)?(postgres|postgresql|mysql|mariadb|sqlserver|oracle|mongodb|mssql|clickhouse|redis|rediss)(\+\w+)?(:\/\/)[^:\s]+:[^@\s]+@[^:\s\/]+(:[0-9]{1,5})?\/?[^\s''"]*'
|
|
116
|
+
|
|
117
|
+
# ============================================================================
|
|
118
|
+
# OAUTH / CLIENT SECRETS
|
|
119
|
+
# ============================================================================
|
|
120
|
+
|
|
121
|
+
- name: OAuth Client Secret
|
|
122
|
+
keywords:
|
|
123
|
+
- client_secret
|
|
124
|
+
regex:
|
|
125
|
+
pattern: '(?i)(client_secret)\s*[:=]\s*[''"]?[0-9A-Za-z\-._~]{16,}[''"]?'
|
|
126
|
+
|
|
127
|
+
- name: OAuth Client ID
|
|
128
|
+
keywords:
|
|
129
|
+
- client_id
|
|
130
|
+
regex:
|
|
131
|
+
pattern: '(?i)(client_id)\s*[:=]\s*[''"]?[0-9A-Za-z\-._~]{10,}[''"]?'
|
|
132
|
+
|
|
133
|
+
- name: OIDC Keycloak Client Secret
|
|
134
|
+
keywords:
|
|
135
|
+
- client_secret
|
|
136
|
+
- client-secret
|
|
137
|
+
- KEYCLOAK_CLIENT_SECRET
|
|
138
|
+
regex:
|
|
139
|
+
pattern: '(?i)(oidc|oauth2|keycloak).*client[_-]?secret.*[:=]\s*[''"]?[0-9A-Za-z\-._~]{16,}[''"]?'
|
|
140
|
+
|
|
141
|
+
- name: ITS-002 Keycloak Client Secret Policy Violation
|
|
142
|
+
keywords:
|
|
143
|
+
- KEYCLOAK_CLIENT_SECRET
|
|
144
|
+
- keycloak.client-secret
|
|
145
|
+
- keycloak_client_secret
|
|
146
|
+
regex:
|
|
147
|
+
pattern: '(?i)(keycloak[_\.-]?client[_-]?secret|KEYCLOAK_CLIENT_SECRET)\s*[:=]\s*[''"]?[0-9A-Za-z\-._~]{12,}[''"]?'
|
|
148
|
+
|
|
149
|
+
- name: Spring OAuth2 Client Secret
|
|
150
|
+
keywords:
|
|
151
|
+
- spring.security.oauth2.client.registration
|
|
152
|
+
- client-secret
|
|
153
|
+
regex:
|
|
154
|
+
pattern: '(?i)spring\.security\.oauth2\.client\.registration\.[^.\s]+\.client-secret\s*=\s*[''"]?[0-9A-Za-z\-._~]{16,}[''"]?'
|
|
155
|
+
|
|
156
|
+
# ============================================================================
|
|
157
|
+
# GITLAB / GITHUB TOKENS (Custom - keep for consistency)
|
|
158
|
+
# ============================================================================
|
|
159
|
+
|
|
160
|
+
- name: GitLab Personal Access Token
|
|
161
|
+
keywords:
|
|
162
|
+
- glpat-
|
|
163
|
+
regex:
|
|
164
|
+
pattern: 'glpat-[0-9A-Za-z_\-]{20,}'
|
|
165
|
+
|
|
166
|
+
- name: GitHub Personal Access Token
|
|
167
|
+
keywords:
|
|
168
|
+
- ghp_
|
|
169
|
+
regex:
|
|
170
|
+
pattern: 'ghp_[0-9A-Za-z]{20,}'
|
|
171
|
+
|
|
172
|
+
# ============================================================================
|
|
173
|
+
# SMTP / MAIL
|
|
174
|
+
# ============================================================================
|
|
175
|
+
|
|
176
|
+
- name: SMTP URL Credentials
|
|
177
|
+
keywords:
|
|
178
|
+
- smtp://
|
|
179
|
+
- smtps://
|
|
180
|
+
regex:
|
|
181
|
+
pattern: '(?i)smtps?:\/\/[^:\s\/]+:[^@\s\/]+@[^\/\s''"]+'
|
|
182
|
+
|
|
183
|
+
# ============================================================================
|
|
184
|
+
# VPN / PROXY / INFRASTRUCTURE SECRETS
|
|
185
|
+
# ============================================================================
|
|
186
|
+
|
|
187
|
+
- name: VPN Credentials
|
|
188
|
+
keywords:
|
|
189
|
+
- vpn-user
|
|
190
|
+
- vpn-login
|
|
191
|
+
- vpn-password
|
|
192
|
+
- vpn-cert
|
|
193
|
+
- openvpn-key
|
|
194
|
+
regex:
|
|
195
|
+
pattern: '(?i)(vpn[_-]?user|vpn[_-]?login|vpn[_-]?password|vpn[_-]?cert|openvpn[_-]?key)\s*[:=]\s*[''"]?[A-Za-z0-9_\-+/=]{16,}[''"]?'
|
|
196
|
+
|
|
197
|
+
- name: Proxy Credentials
|
|
198
|
+
keywords:
|
|
199
|
+
- proxy-user
|
|
200
|
+
- proxy-login
|
|
201
|
+
- proxy-password
|
|
202
|
+
- proxy-auth
|
|
203
|
+
regex:
|
|
204
|
+
pattern: '(?i)(proxy[_-]?user|proxy[_-]?login|proxy[_-]?password|proxy[_-]?auth)\s*[:=]\s*[''"]?[A-Za-z0-9_\-]{8,}[''"]?'
|
|
205
|
+
|
|
206
|
+
- name: GitLab Runner Token
|
|
207
|
+
keywords:
|
|
208
|
+
- gitlab-runner-token
|
|
209
|
+
- ci-cd-token
|
|
210
|
+
- runner-registration-token
|
|
211
|
+
regex:
|
|
212
|
+
pattern: '(?i)(gitlab[_-]?runner[_-]?token|ci[_-]?cd[_-]?token|runner[_-]?registration[_-]?token)\s*[:=]\s*[''"]?[A-Za-z0-9_\-]{20,}[''"]?'
|
|
213
|
+
|
|
214
|
+
- name: Self-Hosted CI/CD Token
|
|
215
|
+
keywords:
|
|
216
|
+
- jenkins-token
|
|
217
|
+
- teamcity-token
|
|
218
|
+
- bamboo-token
|
|
219
|
+
- self-hosted-ci-token
|
|
220
|
+
regex:
|
|
221
|
+
pattern: '(?i)(jenkins[_-]?token|teamcity[_-]?token|bamboo[_-]?token|self[_-]?hosted[_-]?ci[_-]?token)\s*[:=]\s*[''"]?[A-Za-z0-9_\-]{20,}[''"]?'
|
|
222
|
+
|
|
223
|
+
# ============================================================================
|
|
224
|
+
# INFRASTRUCTURE (Vault, Atlassian, Grafana, Nexus/NPM, Elastic, 1C, Kafka)
|
|
225
|
+
# Соответствует новым правилам в gitleaks.rules.toml (techstack.md)
|
|
226
|
+
# ============================================================================
|
|
227
|
+
- name: HashiCorp Vault Token
|
|
228
|
+
keywords:
|
|
229
|
+
- vault
|
|
230
|
+
- hvs.
|
|
231
|
+
- hvc.
|
|
232
|
+
regex:
|
|
233
|
+
pattern: '(hvs\.CAES[A-Za-z0-9_\-]+|hvc\.CAES[A-Za-z0-9_\-]+|\bs\.[A-Za-z0-9_\-]{20,})'
|
|
234
|
+
|
|
235
|
+
- name: ITS-002 Vault Token Policy Violation
|
|
236
|
+
keywords:
|
|
237
|
+
- vault_token
|
|
238
|
+
- VAULT_TOKEN
|
|
239
|
+
- vault-token
|
|
240
|
+
regex:
|
|
241
|
+
pattern: '(?i)(vault[_-]?token|VAULT_TOKEN)\s*[:=]\s*[''"]?(hvs\.CAES[A-Za-z0-9_\-]+|hvc\.CAES[A-Za-z0-9_\-]+|s\.[A-Za-z0-9_\-]{8,})[''"]?'
|
|
242
|
+
|
|
243
|
+
- name: Atlassian API Token
|
|
244
|
+
keywords:
|
|
245
|
+
- ATATT
|
|
246
|
+
regex:
|
|
247
|
+
pattern: 'ATATT[A-Za-z0-9_\-]{80,}'
|
|
248
|
+
|
|
249
|
+
- name: Grafana API Token
|
|
250
|
+
keywords:
|
|
251
|
+
- glsa_
|
|
252
|
+
regex:
|
|
253
|
+
pattern: 'glsa_[A-Za-z0-9_\-]{40,}'
|
|
254
|
+
|
|
255
|
+
- name: Maven settings.xml Password
|
|
256
|
+
keywords:
|
|
257
|
+
- "<password>"
|
|
258
|
+
regex:
|
|
259
|
+
pattern: '<password>\s*[^<\s]{8,}\s*</password>'
|
|
260
|
+
|
|
261
|
+
- name: NPM Auth Token
|
|
262
|
+
keywords:
|
|
263
|
+
- _authToken
|
|
264
|
+
- _auth
|
|
265
|
+
- registry.npmjs.org_auth
|
|
266
|
+
regex:
|
|
267
|
+
pattern: '(?i)(_authToken|_auth|registry\.npmjs\.org[_-]?auth)\s*=\s*[A-Za-z0-9_\-=]{20,}'
|
|
268
|
+
|
|
269
|
+
- name: Elasticsearch OpenSearch Auth
|
|
270
|
+
keywords:
|
|
271
|
+
- xpack.security
|
|
272
|
+
- cloud.auth
|
|
273
|
+
- api_key
|
|
274
|
+
- elasticsearch.password
|
|
275
|
+
regex:
|
|
276
|
+
pattern: '(?i)(xpack\.security\.(user|password)|cloud\.auth|api_key|elasticsearch\.password)\s*[:=]\s*[''"]?[A-Za-z0-9_\-=]{16,}[''"]?'
|
|
277
|
+
|
|
278
|
+
- name: 1C Base Connection String
|
|
279
|
+
keywords:
|
|
280
|
+
- Server=
|
|
281
|
+
- Ref=
|
|
282
|
+
- Password=
|
|
283
|
+
regex:
|
|
284
|
+
pattern: '(?i)(Server|Srv)\s*=\s*[^;]+;(Ref|InfoBase)\s*=\s*[^;]+;.*(Password|Pwd)\s*=\s*[^;\s''"]{6,}'
|
|
285
|
+
|
|
286
|
+
- name: Kafka SASL Credentials
|
|
287
|
+
keywords:
|
|
288
|
+
- sasl.jaas
|
|
289
|
+
- sasl.username
|
|
290
|
+
- sasl.password
|
|
291
|
+
regex:
|
|
292
|
+
pattern: '(?i)(sasl\.(jaas\.config|username|password)|org\.apache\.kafka\.common\.security\.plain\.(username|password))\s*[:=]\s*[''"]?[^''"\s]{8,}[''"]?'
|
|
293
|
+
|
|
294
|
+
- name: Generic Header API Key
|
|
295
|
+
keywords:
|
|
296
|
+
- x-api-key
|
|
297
|
+
- x-auth-token
|
|
298
|
+
- x-api-token
|
|
299
|
+
regex:
|
|
300
|
+
pattern: '(?i)(x-api-key|x-auth-token|x-api-token)\s*[:=]\s*[''"]?[0-9A-Za-z\-._~]{24,}[''"]?'
|
|
301
|
+
|
|
302
|
+
# ============================================================================
|
|
303
|
+
# GENERIC TOKENS / API KEYS
|
|
304
|
+
# ============================================================================
|
|
305
|
+
|
|
306
|
+
- name: Generic Bearer Token
|
|
307
|
+
keywords:
|
|
308
|
+
- authorization
|
|
309
|
+
- bearer
|
|
310
|
+
regex:
|
|
311
|
+
pattern: '(?i)authorization:\s*bearer\s+[0-9A-Za-z\-\._~\+\/]{20,}=*'
|
|
312
|
+
|
|
313
|
+
- name: Hardcoded Password
|
|
314
|
+
keywords:
|
|
315
|
+
- password
|
|
316
|
+
- passwd
|
|
317
|
+
- pwd
|
|
318
|
+
- secret
|
|
319
|
+
- key
|
|
320
|
+
- token
|
|
321
|
+
- salt
|
|
322
|
+
- api_key
|
|
323
|
+
- apikey
|
|
324
|
+
regex:
|
|
325
|
+
pattern: '(?i)(password|passwd|pwd|secret|key|token|salt|api_key|apikey)\s*[:=]\s*[''"][^''"]{8,}[''"]'
|
|
326
|
+
|
|
327
|
+
- name: Generic API Key
|
|
328
|
+
keywords:
|
|
329
|
+
- api_key
|
|
330
|
+
- api-key
|
|
331
|
+
- apikey
|
|
332
|
+
regex:
|
|
333
|
+
pattern: '(?i)(api[_-]?key|apikey)\s*[:=]\s*[''"]?[0-9A-Za-z_\-]{32,}[''"]?'
|
|
334
|
+
|
|
335
|
+
- name: Generic Secret Token
|
|
336
|
+
keywords:
|
|
337
|
+
- secret
|
|
338
|
+
- token
|
|
339
|
+
- password
|
|
340
|
+
regex:
|
|
341
|
+
pattern: '(?i)(secret|token|password|passwd)\s*[:=]\s*[''"]?[0-9A-Za-z_\-]{40,}[''"]?'
|
|
342
|
+
|
|
343
|
+
# ============================================================================
|
|
344
|
+
# PII (PERSONAL IDENTIFIABLE INFORMATION) - GDPR/COMPLIANCE
|
|
345
|
+
# ============================================================================
|
|
346
|
+
|
|
347
|
+
- name: PII Email
|
|
348
|
+
keywords:
|
|
349
|
+
- email
|
|
350
|
+
- e-mail
|
|
351
|
+
- mail
|
|
352
|
+
regex:
|
|
353
|
+
pattern: '(?i)(email|e-mail|mail)\s*[:=]\s*[''"]?[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}[''"]?'
|
|
354
|
+
|
|
355
|
+
- name: PII Phone RU
|
|
356
|
+
keywords:
|
|
357
|
+
- phone
|
|
358
|
+
- tel
|
|
359
|
+
- mobile
|
|
360
|
+
- телефон
|
|
361
|
+
regex:
|
|
362
|
+
pattern: '(?i)(phone|tel|mobile|телефон)\s*[:=]\s*[''"]?(\+7|8)?[\s\-]?\(?[0-9]{3}\)?[\s\-]?[0-9]{3}[\s\-]?[0-9]{2}[\s\-]?[0-9]{2}[''"]?'
|
|
363
|
+
|
|
364
|
+
- name: PII Passport RU
|
|
365
|
+
keywords:
|
|
366
|
+
- passport
|
|
367
|
+
- паспорт
|
|
368
|
+
regex:
|
|
369
|
+
pattern: '(?i)(passport|паспорт)\s*[:=]\s*[''"]?[0-9]{4}\s*[0-9]{6}[''"]?'
|
|
370
|
+
|
|
371
|
+
- name: PII SNILS
|
|
372
|
+
keywords:
|
|
373
|
+
- snils
|
|
374
|
+
- снилс
|
|
375
|
+
regex:
|
|
376
|
+
pattern: '(?i)(snils|снилс)\s*[:=]\s*[''"]?[0-9]{3}[\s\-]?[0-9]{3}[\s\-]?[0-9]{3}[\s\-]?[0-9]{2}[''"]?'
|
|
377
|
+
|
|
378
|
+
- name: PII Credit Card
|
|
379
|
+
keywords:
|
|
380
|
+
- card
|
|
381
|
+
- credit
|
|
382
|
+
- debit
|
|
383
|
+
- pan
|
|
384
|
+
- card_number
|
|
385
|
+
- cc_number
|
|
386
|
+
regex:
|
|
387
|
+
pattern: '(?i)(card|credit|debit|pan|card_number|cardNumber|cc_number|ccNumber)\s*[:=]\s*[''"]?[0-9]{4}[\s\-]?[0-9]{4}[\s\-]?[0-9]{4}[\s\-]?[0-9]{4}[''"]?'
|
|
388
|
+
|
|
389
|
+
- name: PII IBAN
|
|
390
|
+
keywords:
|
|
391
|
+
- iban
|
|
392
|
+
regex:
|
|
393
|
+
pattern: '(?i)(iban)\s*[:=]\s*[''"]?[A-Z]{2}[0-9]{2}[A-Z0-9]{4,30}[''"]?'
|
|
394
|
+
|
|
395
|
+
- name: PII BIC SWIFT
|
|
396
|
+
keywords:
|
|
397
|
+
- bic
|
|
398
|
+
- swift
|
|
399
|
+
regex:
|
|
400
|
+
pattern: '(?i)(bic|swift)\s*[:=]\s*[''"]?[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?[''"]?'
|
|
401
|
+
|
|
402
|
+
- name: PII INN RU
|
|
403
|
+
keywords:
|
|
404
|
+
- inn
|
|
405
|
+
- инн
|
|
406
|
+
regex:
|
|
407
|
+
pattern: '(?i)(inn|инн)\s*[:=]\s*[''"]?[0-9]{10,12}[''"]?'
|