xploitscan-shared-rules 2.4.21 → 2.4.22

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.d.cts CHANGED
@@ -1,7 +1,9 @@
1
+ export { IgnoreEntry, MAX_IGNORE_BYTES, MAX_IGNORE_LINES, MAX_SUPPRESSED_LIST, MAX_WARNING_CAP, NESTED_IGNORE_WARNING, RULE_ID_PATTERN, SUPPRESSION_REGEXES, ScanSuppressionMeta, SuppressionInfo, SuppressionWarning, applySuppressions, attachInlineSuppressed, attachScanSuppression, buildMarkerIndex, capWarnings, clampCount, countPass, isRootIgnorePath, isRuleScopedIgnoreLine, isUnscopedOverBroadLine, isWellFormedRuleId, markerCoversLine, maskStringLiterals, matchIgnore, parseIgnoreFile, parseIgnoreSources, parseMarkers, publicSuppressedRecord, readInlineSuppressed, readScanSuppression, suppressionSummary, warningForUpload, warningLine } from './suppression.cjs';
1
2
  import { ParseResult } from '@babel/parser';
2
3
  import { File, Node, CallExpression, ObjectExpression, BinaryExpression } from '@babel/types';
3
4
  import { AiStatus, AiReason, AiSurface, PlanCause } from './ai-status-constants.cjs';
4
5
  export { AI_REASONS, AI_STATUSES, AI_SURFACES, PLAN_CAUSES, WEBHOOK_EVENT_TYPES, WEBHOOK_REASONS } from './ai-status-constants.cjs';
6
+ import 'ignore';
5
7
 
6
8
  /**
7
9
  * Cross-file facts a rule cannot learn from the file it is scanning.
@@ -167,7 +169,7 @@ interface CustomRule {
167
169
  * before a scan can be saved without enough provenance to explain a changed
168
170
  * grade.
169
171
  */
170
- declare const SCANNER_VERSION = "2.4.21";
172
+ declare const SCANNER_VERSION = "2.4.22";
171
173
 
172
174
  /**
173
175
  * Line-oriented helpers shared by every rule. Pure string manipulation — no fs
@@ -244,7 +246,7 @@ declare function deduplicateFindings<T extends Finding>(findings: readonly T[]):
244
246
  * calling this directly from their match loop or by passing their results
245
247
  * through filterSilenced().
246
248
  */
247
- declare function isInlineSilenced(content: string, matchIndex: number, ruleId: string): boolean;
249
+ declare function isInlineSilenced(_content: string, _matchIndex: number, _ruleId: string): boolean;
248
250
  /**
249
251
  * Line-indexed variant. The entropy scanner walks the file line by line and
250
252
  * never computes character offsets, so making it reconstruct one just to call
@@ -1086,7 +1088,7 @@ declare function isInsideFixMessage(content: string, matchIndex: number): boolea
1086
1088
  * high/critical rules a per-site escape valve so users don't disable a whole
1087
1089
  * rule to suppress one reviewed-and-accepted finding.
1088
1090
  */
1089
- declare function filterSilenced(matches: RuleMatch[], content: string, ruleId: string): RuleMatch[];
1091
+ declare function filterSilenced(matches: RuleMatch[], _content: string, _ruleId: string): RuleMatch[];
1090
1092
  declare function findMatches(content: string, pattern: RegExp, rule: Omit<CustomRule, "check">, filePath: string, fixTemplate?: (match: RegExpExecArray) => string): RuleMatch[];
1091
1093
  /**
1092
1094
  * findMatches for a matcher that is not a single RegExp — one a regex can
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
+ export { IgnoreEntry, MAX_IGNORE_BYTES, MAX_IGNORE_LINES, MAX_SUPPRESSED_LIST, MAX_WARNING_CAP, NESTED_IGNORE_WARNING, RULE_ID_PATTERN, SUPPRESSION_REGEXES, ScanSuppressionMeta, SuppressionInfo, SuppressionWarning, applySuppressions, attachInlineSuppressed, attachScanSuppression, buildMarkerIndex, capWarnings, clampCount, countPass, isRootIgnorePath, isRuleScopedIgnoreLine, isUnscopedOverBroadLine, isWellFormedRuleId, markerCoversLine, maskStringLiterals, matchIgnore, parseIgnoreFile, parseIgnoreSources, parseMarkers, publicSuppressedRecord, readInlineSuppressed, readScanSuppression, suppressionSummary, warningForUpload, warningLine } from './suppression.js';
1
2
  import { ParseResult } from '@babel/parser';
2
3
  import { File, Node, CallExpression, ObjectExpression, BinaryExpression } from '@babel/types';
3
4
  import { AiStatus, AiReason, AiSurface, PlanCause } from './ai-status-constants.js';
4
5
  export { AI_REASONS, AI_STATUSES, AI_SURFACES, PLAN_CAUSES, WEBHOOK_EVENT_TYPES, WEBHOOK_REASONS } from './ai-status-constants.js';
6
+ import 'ignore';
5
7
 
6
8
  /**
7
9
  * Cross-file facts a rule cannot learn from the file it is scanning.
@@ -167,7 +169,7 @@ interface CustomRule {
167
169
  * before a scan can be saved without enough provenance to explain a changed
168
170
  * grade.
169
171
  */
170
- declare const SCANNER_VERSION = "2.4.21";
172
+ declare const SCANNER_VERSION = "2.4.22";
171
173
 
172
174
  /**
173
175
  * Line-oriented helpers shared by every rule. Pure string manipulation — no fs
@@ -244,7 +246,7 @@ declare function deduplicateFindings<T extends Finding>(findings: readonly T[]):
244
246
  * calling this directly from their match loop or by passing their results
245
247
  * through filterSilenced().
246
248
  */
247
- declare function isInlineSilenced(content: string, matchIndex: number, ruleId: string): boolean;
249
+ declare function isInlineSilenced(_content: string, _matchIndex: number, _ruleId: string): boolean;
248
250
  /**
249
251
  * Line-indexed variant. The entropy scanner walks the file line by line and
250
252
  * never computes character offsets, so making it reconstruct one just to call
@@ -1086,7 +1088,7 @@ declare function isInsideFixMessage(content: string, matchIndex: number): boolea
1086
1088
  * high/critical rules a per-site escape valve so users don't disable a whole
1087
1089
  * rule to suppress one reviewed-and-accepted finding.
1088
1090
  */
1089
- declare function filterSilenced(matches: RuleMatch[], content: string, ruleId: string): RuleMatch[];
1091
+ declare function filterSilenced(matches: RuleMatch[], _content: string, _ruleId: string): RuleMatch[];
1090
1092
  declare function findMatches(content: string, pattern: RegExp, rule: Omit<CustomRule, "check">, filePath: string, fixTemplate?: (match: RegExpExecArray) => string): RuleMatch[];
1091
1093
  /**
1092
1094
  * findMatches for a matcher that is not a single RegExp — one a regex can