You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add inline suppression comments (# codelens-ignore, // codelens-ignore, /* codelens-ignore */, <!-- codelens-ignore -->) so users can silence false positives at line level. Suppressed findings remain in registry with status: suppressed for audit. SARIF suppressions field populated per spec.
Same syntax, default keyword codelens-ignore (more brandable than nosem). --codelens-ignore-pattern <regex> for custom keyword (e.g. nosemgrep compat). SARIF suppressions field per spec.
Filter at output layer (not engine layer) for auditability
--codelens-ignore-pattern <regex> for custom keyword
--disable-suppression flag for strict CI policy
SARIF suppressions field populated
Acceptance criteria
Works in Python, JS, TS, Rust, Go, Java, C, C++, Ruby, PHP, HTML, CSS (12 languages)
Suppressed findings appear in --format json output with status: suppressed
SARIF output uses suppressions field
30+ test cases (per UBS guidance to avoid count-pipeline bypass bug)
--disable-suppression exits non-zero if any suppressed finding has severity ≥ high
Critical implementation note (from UBS)
UBS had a production bug (#51) where 21 bypass patterns were missed in v5.3.0 because count pipelines weren't audited. Audit ALL count pipelines in CodeLens (smell.stats.total_findings, secrets.stats.findings_count, taint.stats.violations, etc.) to ensure suppressed findings are counted as suppressed, not as active.
Files
New scripts/suppression.py
Update all engine _build_result methods to populate suppression fields
Update scripts/formatters/sarif.py for suppressions field
Update scripts/codelens.py for --codelens-ignore-pattern and --disable-suppression flags
Summary
Add inline suppression comments (
# codelens-ignore,// codelens-ignore,/* codelens-ignore */,<!-- codelens-ignore -->) so users can silence false positives at line level. Suppressed findings remain in registry withstatus: suppressedfor audit. SARIFsuppressionsfield populated per spec.Worker consensus (3 reports — identical proposal)
update!/CodeLens_UBS_Upgrade_Analysis.md#1# codelens-ignore,// codelens-ignore-next-line, optional rule-id list +-- reasontext. Cross-language (Python, JS/TS/C/C++/Java/Rust/Go/Swift, Ruby, HTML, CSS). P0 quick win. Critical: audit ALL count pipelines (UBS bug #51 had 21 bypass patterns missed in v5.3.0).update!/CodeLens_Opengrep_Upgrade_Analysis.md#35codelens-ignore(more brandable thannosem).--codelens-ignore-pattern <regex>for custom keyword (e.g.nosemgrepcompat). SARIFsuppressionsfield per spec.update!/CodeLens_Upgrade_Issues_from_Semgrep.mdCL-011# nolensand Semgrep-compatible# nosemgrepfor ecosystem compat. Multi-language comment syntax.--disable-nolensenforces strict CI policy. Stats:{suppressed: N, by_rule: {...}}.Proposed scope (P1, 3-5 days)
codelens-ignore(brandable) + acceptnolens/nosemgrepas aliases<code> // codelens-ignore: rule-id-1, rule-id-2 -- reason(suppress specific rules with reason)<code> // codelens-ignore(suppress all rules on line)/* codelens-ignore-next: rule-id */on line before finding (multi-line)finding.suppressed = true,finding.suppressed_rules = [...],finding.suppressed_reason = "..."--codelens-ignore-pattern <regex>for custom keyword--disable-suppressionflag for strict CI policysuppressionsfield populatedAcceptance criteria
--format jsonoutput withstatus: suppressedsuppressionsfield--disable-suppressionexits non-zero if any suppressed finding has severity ≥ highCritical implementation note (from UBS)
UBS had a production bug (#51) where 21 bypass patterns were missed in v5.3.0 because count pipelines weren't audited. Audit ALL count pipelines in CodeLens (
smell.stats.total_findings,secrets.stats.findings_count,taint.stats.violations, etc.) to ensure suppressed findings are counted as suppressed, not as active.Files
scripts/suppression.py_build_resultmethods to populate suppression fieldsscripts/formatters/sarif.pyforsuppressionsfieldscripts/codelens.pyfor--codelens-ignore-patternand--disable-suppressionflagstests/test_suppression.pywith 30+ cases