xploitscan-shared-rules 1.36.0 → 1.36.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2425,7 +2425,7 @@ var evalUsage = {
2425
2425
  title: "Use of eval() or Function Constructor",
2426
2426
  severity: "high",
2427
2427
  category: "Injection",
2428
- description: "eval() and new Function() execute arbitrary code, creating severe injection risks. Common in AI-generated code.",
2428
+ description: "eval() and new Function() execute arbitrary code, creating severe injection risks.",
2429
2429
  check(content, filePath) {
2430
2430
  if (filePath.includes("node_modules") || filePath.includes(".min.")) return [];
2431
2431
  if (filePath.match(/(?:webpack|rollup|vite|jest|babel|tsup|esbuild)\.config/i)) return [];
@@ -3089,7 +3089,7 @@ var missingHTTPS = {
3089
3089
  title: "Missing HTTPS Enforcement",
3090
3090
  severity: "high",
3091
3091
  category: "Configuration",
3092
- description: "HTTP URLs in production code, missing HSTS headers, or insecure redirect configurations expose data to man-in-the-middle attacks.",
3092
+ description: "Hardcoded http:// URLs (other than localhost and private-network addresses) send data unencrypted, exposing it to man-in-the-middle attacks.",
3093
3093
  check(content, filePath) {
3094
3094
  if (filePath.endsWith(".example") || filePath.includes("test") || filePath.includes("README")) return [];
3095
3095
  if (filePath.match(/\.(md|txt)$/)) return [];
@@ -3674,7 +3674,7 @@ var weakPasswordRequirements = {
3674
3674
  p,
3675
3675
  weakPasswordRequirements,
3676
3676
  filePath,
3677
- () => "Minimum password length is too low. Require at least 8 characters with complexity (upper+lower+digit+symbol) or 12+ characters without complexity. OWASP ASVS L1 requires 8+; NIST 800-63B recommends 12+."
3677
+ () => "Minimum password length is too low. Require at least 8 characters, and at least 15 when the password is the only authentication factor (NIST SP 800-63B)."
3678
3678
  ));
3679
3679
  }
3680
3680
  if (matches.length > 0) return matches;
@@ -4623,7 +4623,7 @@ var corsServerless = {
4623
4623
  title: "CORS Wildcard in Serverless Config",
4624
4624
  severity: "high",
4625
4625
  category: "Configuration",
4626
- description: "Setting Access-Control-Allow-Origin: * in serverless.yml, vercel.json, or similar configs allows any website to make authenticated requests to your API.",
4626
+ description: "Setting Access-Control-Allow-Origin: * in serverless.yml, vercel.json, or similar configs lets any website read your API's responses.",
4627
4627
  check(content, filePath) {
4628
4628
  if (!filePath.match(/serverless\.(yml|yaml)|vercel\.json|netlify\.toml|amplify\.yml/i)) return [];
4629
4629
  const matches = [];
@@ -5413,7 +5413,7 @@ var complianceMap = {
5413
5413
  VC022: { owasp: "A03:2021", cwe: "CWE-79" },
5414
5414
  VC023: { owasp: "A08:2021", cwe: "CWE-1321" },
5415
5415
  VC024: { owasp: "A04:2021", cwe: "CWE-770" },
5416
- VC025: { owasp: "A03:2021", cwe: "CWE-22" },
5416
+ VC025: { owasp: "A01:2021", cwe: "CWE-22" },
5417
5417
  VC026: { owasp: "A05:2021", cwe: "CWE-693" },
5418
5418
  VC027: { owasp: "A05:2021", cwe: "CWE-693" },
5419
5419
  VC028: { owasp: "A07:2021", cwe: "CWE-20" },
@@ -5441,7 +5441,7 @@ var complianceMap = {
5441
5441
  VC050: { owasp: "A02:2021", cwe: "CWE-319" },
5442
5442
  VC051: { owasp: "A05:2021", cwe: "CWE-200" },
5443
5443
  VC052: { owasp: "A04:2021", cwe: "CWE-770" },
5444
- VC053: { owasp: "A05:2021", cwe: "CWE-798" },
5444
+ VC053: { owasp: "A05:2021", cwe: "CWE-547" },
5445
5445
  VC054: { owasp: "A07:2021", cwe: "CWE-922" },
5446
5446
  VC055: { owasp: "A05:2021", cwe: "CWE-540" },
5447
5447
  VC056: { owasp: "A05:2021", cwe: "CWE-1021" },
@@ -5499,13 +5499,13 @@ var complianceMap = {
5499
5499
  VC108: { owasp: "A01:2021", cwe: "CWE-284" },
5500
5500
  VC109: { owasp: "A01:2021", cwe: "CWE-284" },
5501
5501
  VC110: { owasp: "A09:2021", cwe: "CWE-778" },
5502
- VC111: { owasp: "A05:2021", cwe: "CWE-16" },
5502
+ VC111: { owasp: "A05:2021", cwe: "CWE-653" },
5503
5503
  VC112: { owasp: "A06:2021", cwe: "CWE-1104" },
5504
5504
  VC113: { owasp: "A05:2021", cwe: "CWE-200" },
5505
- VC114: { owasp: "A05:2021", cwe: "CWE-16" },
5505
+ VC114: { owasp: "A05:2021", cwe: "CWE-668" },
5506
5506
  VC115: { owasp: "A02:2021", cwe: "CWE-311" },
5507
5507
  VC116: { owasp: "A05:2021", cwe: "CWE-770" },
5508
- VC117: { owasp: "A03:2021", cwe: "CWE-22" },
5508
+ VC117: { owasp: "A01:2021", cwe: "CWE-22" },
5509
5509
  VC118: { owasp: "A09:2021", cwe: "CWE-532" },
5510
5510
  VC119: { owasp: "A07:2021", cwe: "CWE-798" },
5511
5511
  VC120: { owasp: "A07:2021", cwe: "CWE-352" },
@@ -5548,7 +5548,7 @@ var complianceMap = {
5548
5548
  VC154: { owasp: "A03:2021", cwe: "CWE-20" },
5549
5549
  VC155: { owasp: "A04:2021", cwe: "CWE-770" },
5550
5550
  VC156: { owasp: "A04:2021", cwe: "CWE-770" },
5551
- VC157: { owasp: "A05:2021", cwe: "CWE-16" },
5551
+ VC157: { owasp: "A05:2021", cwe: "CWE-1327" },
5552
5552
  VC158: { owasp: "A01:2021", cwe: "CWE-639" },
5553
5553
  // VC159–VC183: Additional service-specific API key detection.
5554
5554
  // All map to A07:2021 (Identification & Auth Failures) / CWE-798 (Hardcoded
@@ -6227,7 +6227,7 @@ var piiInLogs = {
6227
6227
  title: "Personally Identifiable Information in Logs",
6228
6228
  severity: "high",
6229
6229
  category: "Information Leakage",
6230
- description: "Logging statements that include email addresses, passwords, SSNs, credit card numbers, or other PII can leak sensitive data to log aggregation systems.",
6230
+ description: "Logging statements that include passwords, secrets, tokens, authorization headers, SSNs, credit card numbers or CVVs can leak sensitive data to log aggregation systems.",
6231
6231
  check(content, filePath) {
6232
6232
  if (isTestFile(filePath)) return [];
6233
6233
  if (!filePath.match(/\.(js|ts|jsx|tsx|py|rb|go|java|php)$/)) return [];
@@ -6670,7 +6670,7 @@ var vulnerableDependencies = {
6670
6670
  title: "Potentially Vulnerable Dependency",
6671
6671
  severity: "high",
6672
6672
  category: "Supply Chain",
6673
- description: "Dependencies with known security issues that are commonly found in AI-generated codebases.",
6673
+ description: "Dependency versions with known security issues.",
6674
6674
  check(content, filePath) {
6675
6675
  if (!filePath.endsWith("package.json")) return [];
6676
6676
  if (/node_modules|\.next|dist|build/.test(filePath)) return [];
@@ -6679,7 +6679,7 @@ var vulnerableDependencies = {
6679
6679
  [/"jsonwebtoken"\s*:\s*"[\^~]?[0-7]\./g, "jsonwebtoken < 8.x has signature bypass vulnerabilities"],
6680
6680
  [/"lodash"\s*:\s*"[\^~]?[0-3]\./g, "lodash < 4.x has prototype pollution vulnerabilities"],
6681
6681
  [/"minimist"\s*:\s*"[\^~]?[01]\.[01]\./g, "minimist < 1.2.6 has prototype pollution"],
6682
- [/"node-fetch"\s*:\s*"[\^~]?[12]\./g, "node-fetch < 3.x has data exposure issues"],
6682
+ [/"node-fetch"\s*:\s*"[\^~]?[12]\./g, "node-fetch before 2.6.7 (and 3.x before 3.1.1) forwards cookie and authorization headers on cross-origin redirects (CVE-2022-0235); check that this 1.x/2.x range resolves to 2.6.7 or later"],
6683
6683
  [/"express"\s*:\s*"[\^~]?[0-3]\./g, "express < 4.x has multiple known vulnerabilities"],
6684
6684
  [/"axios"\s*:\s*"[\^~]?0\.[0-9]\./g, "axios < 0.21 has SSRF vulnerabilities"],
6685
6685
  [/"tar"\s*:\s*"[\^~]?[0-5]\./g, "tar < 6.x has path traversal vulnerabilities"],
@@ -7616,7 +7616,7 @@ var ghaThirdPartyActionWithSecrets = {
7616
7616
  title: "GitHub Actions: secrets passed to third-party action",
7617
7617
  severity: "medium",
7618
7618
  category: "Supply Chain",
7619
- description: "Passing repository secrets (`${{ secrets.* }}`) via the `with:` block to a third-party action means the action's source code \u2014 and any transitive dependencies it pulls \u2014 has access to those secrets. The 2025 tj-actions/changed-files supply-chain attack stole secrets exactly this way. Common when intentional (AWS, Cloudflare, GCP credential actions) but worth flagging for review.",
7619
+ description: "Passing repository secrets (`${{ secrets.* }}`) via the `with:` block to a third-party action means the action's source code \u2014 and any transitive dependencies it pulls \u2014 has access to those secrets. A compromised action can read every secret its job has access to: in the March 2025 tj-actions/changed-files compromise, the hijacked action dumped secrets from runner memory into build logs. Common when intentional (AWS, Cloudflare, GCP credential actions) but worth flagging for review.",
7620
7620
  check(content, filePath) {
7621
7621
  if (!GHA_WORKFLOW_RE.test(filePath)) return [];
7622
7622
  const findings = [];
@@ -8678,7 +8678,7 @@ var secretInURLParam = {
8678
8678
  title: "Secret Passed in URL Query Parameter",
8679
8679
  severity: "critical",
8680
8680
  category: "Secrets",
8681
- description: "API keys or tokens in URL query parameters are logged in server access logs, browser history, referrer headers, and proxy logs. Secrets in URLs are one of the most common causes of credential exposure.",
8681
+ description: "API keys or tokens in URL query parameters are logged in server access logs, browser history, referrer headers, and proxy logs.",
8682
8682
  check(content, filePath) {
8683
8683
  if (isTestFile(filePath)) return [];
8684
8684
  if (!filePath.match(/\.(js|ts|jsx|tsx|py|rb|go|java|php)$/)) return [];
@@ -10031,7 +10031,7 @@ function assessHeaders(headers) {
10031
10031
  out.push({
10032
10032
  header: "Strict-Transport-Security",
10033
10033
  severity: "medium",
10034
- message: "No HSTS. A first visit over http can be intercepted before the redirect to https."
10034
+ message: "No HSTS. Any visit that starts over http can be intercepted before the redirect to https."
10035
10035
  });
10036
10036
  }
10037
10037
  if (!h["x-content-type-options"]) {
@@ -10045,7 +10045,7 @@ function assessHeaders(headers) {
10045
10045
  out.push({
10046
10046
  header: "Referrer-Policy",
10047
10047
  severity: "low",
10048
- message: "No referrer policy. Full URLs \u2014 including any ids in the path \u2014 leak to third parties."
10048
+ message: "No referrer policy, so the browser default applies. Current browsers send only your origin to other sites, but older ones send full URLs \u2014 including any ids in the path."
10049
10049
  });
10050
10050
  }
10051
10051
  return out;