Repository Analysis

semgrep/semgrep

Lightweight static analysis for many languages. Find bug variants with patterns that look like source code.

5.0 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of semgrep/semgrep, a OCaml project with 15,872 GitHub stars. SynthScan v2.0 examined 519,111 lines of code across 5026 source files, recording 2020 pattern matches distributed across 25 syntactic categories. The overall adjusted score of 5.0 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

5.0
Adjusted Score
5.0
Raw Score
100%
Time Factor
2026-07-14
Last Push
15.9K
Stars
OCaml
Language
519.1K
Lines of Code
5.0K
Files
2.0K
Pattern Hits
2026-07-14
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 28HIGH 18MEDIUM 159LOW 1815

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2020 distinct pattern matches across 25 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers755 hits · 751 pts
SeverityFileLineSnippetContext
LOWtests/patterns/python/cp_exception.py1def throw_must_not_go_through_else():CODE
LOWtests/patterns/python/cp_exception.py15def no_throw_goes_through_else():CODE
LOWtests/patterns/python/cp_exception.py27def may_throw_goes_through_catch_and_else():CODE
LOWtests/patterns/python/cp_exception.py41def exception_or_not_goes_through_finally():CODE
LOWtests/patterns/python/cp_exception.py55def non_nested_try_statements_are_independent():CODE
LOWtests/rules/constprop_bitwise.py45def test_bitwise_and_no_match():CODE
LOWtests/rules/constprop_bitwise.py80def test_arith_right_shift_negative():CODE
LOWtests/rules/constprop_bitwise.py94def test_non_constant_operand():CODE
LOWtests/rules/constprop_bitwise.py110def test_bitnot_double_is_identity():CODE
LOWtests/rules/constprop_bitwise.py117def test_bitnot_positive_is_negative():CODE
LOWtests/rules/constprop_bitwise.py135def test_floordiv_both_negative():CODE
LOWtests/rules/constprop_bitwise.py152def test_floordiv_non_constant(n):CODE
LOWtests/rules/constprop_bitwise.py161def test_floordiv_neg_dividend_drives_sccp():CODE
LOWtests/rules/constprop_bitwise.py172def test_floordiv_neg_divisor_drives_sccp():CODE
LOWtests/rules/constprop_sccp_integration.py45def test_multi_hop_arithmetic():CODE
LOWtests/rules/constprop_sccp_integration.py95def test_loop_invariant_then_sccp():CODE
LOWtests/rules/constprop_sccp_integration.py128def test_floordiv_neg_drives_sccp():CODE
LOWtests/rules/constprop_sccp_integration.py170def test_not_equal_drives_sccp():CODE
LOWtests/rules/constprop_sccp_integration.py181def test_comparison_lte_drives_sccp():CODE
LOWtests/rules/constprop_sccp_integration.py193def test_floordiv_unknown_does_not_drive_sccp(n):CODE
LOWtests/rules/constprop_sccp_integration.py203def test_mod_unknown_does_not_drive_sccp(n):CODE
LOWtests/rules/taint_exception.py93def throw_must_not_go_through_else(input):CODE
LOWtests/rules/taint_exception.py110def no_throw_goes_through_else(input):CODE
LOWtests/rules/taint_exception.py126def may_throw_goes_through_catch_and_else(input):CODE
LOWtests/rules/taint_exception.py143def exception_or_not_goes_through_finally(input):CODE
LOWtests/rules/taint_exception.py161def throw_may_go_through_catch_and_propagates(input):CODE
LOWtests/rules/constprop_sccp.py51def test_arithmetic_condition():CODE
LOWtests/rules/constprop_sccp.py88def test_only_defined_in_live_branch():CODE
LOWtests/rules/constprop_sccp.py102def test_dead_branch_propagation():CODE
LOWtests/rules/constprop_sccp.py173def test_greater_than_or_equal_condition():CODE
LOWtests/rules/constprop_sccp.py184def test_less_than_or_equal_false():CODE
LOWtests/rules/constprop_sccp.py198def test_elif_dead_first_branch():CODE
LOWtests/rules/constprop_sccp.py214def test_loop_invariant_drives_sccp():CODE
LOW…/parsing/python/async_generators_and_comprehensions.py31async def await_inside_comprehension():CODE
LOWtests/perf/timeout.js1075function isStartEmulateButtonPresent() {CODE
LOWtests/perf/timeout.js1136function checkCartIdFieldAndToggleBind(cartIdField) {CODE
LOWtests/perf/timeout.js1238function revertAutocompleteNormalize() {CODE
LOWtests/perf/timeout.js1262function addCustomerListBtnHandler() {CODE
LOWtests/perf/timeout.js1343function asmAifSectionClickHandler() {CODE
LOWtests/perf/timeout.js1385function getCurrentEmulatedCustomerId() {CODE
LOWtests/perf/timeout.js1483function populateCustomerListModal(targetUrl, componentToUpdate, callFunction) {CODE
LOWtests/perf/timeout.js1520function addRatesTableSorterParser() {CODE
LOWtests/perf/timeout.js1793 function getNodeFromRowAndCellIndex(rows, rowIndex, cellIndex) {CODE
LOWtests/perf/timeout.js1926 function computeTableHeaderCellIndexes(t) {CODE
LOWtests/perf/timeout.js1995 function checkHeaderOptionsSortingLocked(table, i) {CODE
LOWtests/perf/three.js21805 function materialNeedsSmoothNormals ( material ) {CODE
LOWtests/perf/three.js21833 function bufferGuessVertexColorType( material ) {CODE
LOWtests/perf/three.js24365 function unrollImmediateBufferMaterial ( globject ) {CODE
LOWcli/tests/conftest.py103def pytest_collection_modifyitems(CODE
LOWcli/tests/conftest.py638def _mk_osemgrep_project_root():CODE
LOWcli/tests/conftest.py685def run_semgrep_on_copied_files(CODE
LOWcli/tests/conftest.py704def run_semgrep_in_test_folder(CODE
LOWcli/tests/conftest.py757def lockfile_path_in_tmp_for_perf(monkeypatch: pytest.MonkeyPatch, tmp_path: Path):CODE
LOWcli/tests/default/unit/test_version.py19def test_version_check_caching(tmp_path, mocker, monkeypatch):CODE
LOW…i/tests/default/unit/test_resolve_dependency_source.py26def test_handle_missing_parser_for_lockfile(mock_parsers_dict) -> None:CODE
LOW…i/tests/default/unit/test_resolve_dependency_source.py60def test_dependency_parser_exception(mock_parsers_dict) -> None:CODE
LOWcli/tests/default/unit/test_dependency_path_wiring.py76def test_subproject_deps_feed_the_parent_index():CODE
LOWcli/tests/default/unit/test_run_scan.py45def test_raises_invalid_rule_schema_under_none():CODE
LOWcli/tests/default/unit/test_run_scan.py56def test_no_raise_under_full_even_with_rule_parse_error():CODE
LOWcli/tests/default/unit/test_run_scan.py63def test_no_raise_under_none_when_no_rule_parse_errors():CODE
695 more matches not shown…
Over-Commented Block520 hits · 514 pts
SeverityFileLineSnippetContext
LOW.pre-commit-config.yaml1# coupling: if you add a check in this file, please add it first inCOMMENT
LOW.pre-commit-config.yaml161 hooks:COMMENT
LOW.pre-commit-config.yaml241 # TODO: remove once file targeting is revamped and supportsCOMMENT
LOW.pre-commit-config.yaml261 # batches and run one semgrep per batch. This is why it'sCOMMENT
LOW.pre-commit-hooks.yaml1# See https://pre-commit.com/#new-hooks for more information on this file.COMMENT
LOWsemgrep.yml1# This file contains Semgrep rules. See https://semgrep.dev for more info.COMMENT
LOWmypy-tests.ini1# TODO: explain why we have a different mypy setup for test code.COMMENT
LOWsetup.py1#COMMENT
LOWtests/patterns/go/partial_single_field2.go1package mainCOMMENT
LOWtests/patterns/go/misc_ref_new.go21 //body, err := io.ReadAll(res.Body)COMMENT
LOW…sts/patterns/python/const_fold_edge_floor_div_large.py1# Floor division with dividends >= 2^62 must fold to the correct result.COMMENT
LOWtests/patterns/python/python2.py1#ERROR: matchCOMMENT
LOWtests/patterns/python/import_metavar_fullpath.py1# what actually matters in this test is the value bound to $XCOMMENT
LOWtests/patterns/python/cp_label.py1# This is not actually valid Python. Python does not allow comments after lineCOMMENT
LOWtests/patterns/python/misc_fake_propa.py1# This used to generate a FakeTokStr exn when we introduced theCOMMENT
LOWtests/patterns/js/infer_const_regexp.js1// Constant propagation should work with regexp literals just like stringCOMMENT
LOWtests/patterns/rust/attribute_matching.rs41// MATCH:COMMENT
LOWtests/patterns/rust/misc_naming_recursion.rs1// this was causing -dump_named_ast to recurse indefinitelyCOMMENT
LOWtests/patterns/java/metavar_typed_bool.java41COMMENT
LOWtests/patterns/json/metavar_array.json1// Note that this file is not really a valid JSON file becauseCOMMENT
LOW…erns/cpp/parsing_todo_tree_sitter/non_recoverable1.cpp21#include "tensorflow/core/framework/tensor_util.h"COMMENT
LOW…erns/cpp/parsing_todo_tree_sitter/non_recoverable1.cpp261 unit_dimension++;COMMENT
LOW…erns/cpp/parsing_todo_tree_sitter/non_recoverable1.cpp281//COMMENT
LOWtests/patterns/csharp/todo/misc_linq.cs1// this used to not match because of bad interaction with -fastCOMMENT
LOWtests/patterns/ruby/metavar_interpolated.rb1# https://github.com/returntocorp/semgrep/issues/3560COMMENT
LOWtests/autofix/python/metavar_string2.py1# Forked from metavar_string.py to comment out the f string below but testCOMMENT
LOWtests/autofix/ts/fix_cast.ts1// Regression test for https://github.com/returntocorp/semgrep/issues/6233. TheCOMMENT
LOWtests/rules_v2/const_fold_overflow.py1# Regression tests for 64-bit integer overflow detection in constant folding.COMMENT
LOWtests/rules_error_recovery/lines_of_file_outofbound.tf1# On this target file, we get some parse errors on the "bar" fieldCOMMENT
LOWtests/rules/typed_metavar_metavar_regex.go1func f(c *http.Request) {COMMENT
LOWtests/rules/kotlin_slow_import.kt21 // "acceptCharset: ${req.acceptCharset()} \n" +COMMENT
LOWtests/rules/kotlin_slow_import.kt41 // "local.uri: ${local.uri} \n" +COMMENT
LOWtests/rules/constprop_bitwise.py1# Tests for bitwise, shift, unary, floor-division, modulo, and power operatorCOMMENT
LOWtests/rules/pattern_regex_inside.py1# from https://github.com/returntocorp/semgrep/issues/912COMMENT
LOWtests/rules/macro_arg_taint.rs1// if this does not properly translate the macro args,COMMENT
LOWtests/rules/sym_prop_no_merge1.go1func test() {COMMENT
LOWtests/rules/constprop_sccp.py1# Tests for SCCP (Sparse Conditional Constant Propagation).COMMENT
LOWtests/rules/taint_labels_rec.rs1async fn test(client: Client, id: String) -> Option<Json<Post>> {COMMENT
LOWtests/rules/relevant_rule_badutf8.js1// Char below somehow causes PCRE engine to throw a BadUTF8 error.COMMENT
LOWtests/rules/date_comparison.py1#ok: date_ruleCOMMENT
LOWtests/parsing/js/cp_assign_record_assign.js1// This used to raise `Impossible` during constant propagation becauseCOMMENT
LOWtests/parsing/dart/dart3_grammar_features.dart1// Smoke test for grammar features added by the tree-sitter-dart bump:COMMENT
LOWtests/parsing/java/textblocks.java1//@ControllerCOMMENT
LOWtests/parsing/java/textblocks.java21COMMENT
LOWtests/parsing/swift/expressions.swift41// correctly parsed, even though that issue has been mitigated.COMMENT
LOWtests/parsing/swift/expressions.swift241({ x in x });COMMENT
LOWtests/perf/three.js30161 points.push( points[ 0 ] );COMMENT
LOWtests/perf/three.js30501//COMMENT
LOWtests/perf/three.js31321// var c = [];COMMENT
LOWcli/pyproject.toml41# These specifiers are flexible so semgrep can coexist with other tools.COMMENT
LOWcli/setup.py1#COMMENT
LOWcli/setup.py81COMMENT
LOWcli/tests/conftest.py1#COMMENT
LOWcli/tests/conftest.py21#COMMENT
LOWcli/tests/conftest.py601# FixturesCOMMENT
LOWcli/tests/semgrep_runner.py1#COMMENT
LOWcli/tests/semgrep_runner.py61 / "semgrep"COMMENT
LOWcli/tests/fixtures.py1#COMMENT
LOWcli/tests/default/unit/test_version.py1#COMMENT
LOW…i/tests/default/unit/test_resolve_dependency_source.py1#COMMENT
460 more matches not shown…
Decorative Section Separators92 hits · 284 pts
SeverityFileLineSnippetContext
MEDIUM.pre-commit-config.yaml19 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml21 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml60 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml62 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml163 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml165 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml182 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml184 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml201 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml203 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml225 # ----------------------------------------------------------COMMENT
MEDIUM.pre-commit-config.yaml227 # ----------------------------------------------------------COMMENT
MEDIUMcli/tests/default/unit/test_scans_v2.py312# ---------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/unit/test_scans_v2.py314# ---------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/unit/test_scans_v2.py384# ---------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/unit/test_scans_v2.py386# ---------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/unit/test_scans_v2.py406# ---------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/unit/test_scans_v2.py408# ---------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/mcp/test_supply_chain_hook.py21# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/mcp/test_supply_chain_hook.py23# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/mcp/test_supply_chain_hook.py159# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/mcp/test_supply_chain_hook.py161# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/mcp/test_supply_chain_hook.py213# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/tests/default/mcp/test_supply_chain_hook.py215# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/src/semgrep/git.py487 # ==============================STRING
MEDIUMcli/src/semgrep/git.py489 # ==============================STRING
MEDIUMcli/src/semgrep/git.py512 # ==================================STRING
MEDIUMcli/src/semgrep/git.py514 # ==================================STRING
MEDIUMcli/src/semgrep/run_scan.py1070 # ---------------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1072 # ---------------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1106 # ---------------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1108 # ---------------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1131 # ---------------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1133 # ---------------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1154 # ---------------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1156 # ---------------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1352 # ----------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1354 # ----------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1415 # ----------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1417 # ----------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1454 # ----------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1456 # ----------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1542 # ----------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1544 # ----------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1613 # ---------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1615 # ---------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1652 # ---------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1654 # ---------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1678 # ---------------------------------COMMENT
MEDIUMcli/src/semgrep/run_scan.py1680 # ---------------------------------COMMENT
MEDIUMcli/src/semgrep/mcp/server.py69# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/src/semgrep/mcp/server.py71# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/src/semgrep/mcp/server.py160# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/src/semgrep/mcp/server.py162# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/src/semgrep/mcp/server.py489# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/src/semgrep/mcp/server.py491# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/src/semgrep/mcp/server.py509# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/src/semgrep/mcp/server.py511# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/src/semgrep/mcp/server.py1309# ---------------------------------------------------------------------------------COMMENT
MEDIUMcli/src/semgrep/mcp/server.py1311# ---------------------------------------------------------------------------------COMMENT
32 more matches not shown…
Hallucination Indicators28 hits · 280 pts
SeverityFileLineSnippetContext
CRITICALtests/precommit_dogfooding/python.yml6561 - pattern: cryptography.hazmat.primitives.asymmetric.dsa.generate_private_key(...,CODE
CRITICALtests/precommit_dogfooding/python.yml6563 - pattern: cryptography.hazmat.primitives.asymmetric.dsa.generate_private_key($SIZE,CODE
CRITICALtests/precommit_dogfooding/python.yml7675 - pattern-inside: cryptography.hazmat.primitives.asymmetric.ec.generate_private_key(...)CODE
CRITICALtests/precommit_dogfooding/python.yml8333 pattern: cryptography.hazmat.primitives.ciphers.algorithms.ARC4(...)CODE
CRITICALtests/precommit_dogfooding/python.yml8539 pattern: cryptography.hazmat.primitives.ciphers.algorithms.Blowfish(...)CODE
CRITICALtests/precommit_dogfooding/python.yml8807 - pattern: cryptography.hazmat.primitives.asymmetric.rsa.generate_private_key(...,CODE
CRITICALtests/precommit_dogfooding/python.yml8809 - pattern: cryptography.hazmat.primitives.asymmetric.rsa.generate_private_key($EXP,CODE
CRITICALtests/precommit_dogfooding/python.yml8903 pattern: cryptography.hazmat.primitives.ciphers.algorithms.IDEA(...)CODE
CRITICALtests/precommit_dogfooding/python.yml9143 pattern: cryptography.hazmat.primitives.ciphers.modes.ECB(...)CODE
CRITICALtests/rules/not_found_exn2.yaml7 cryptography.hazmat.primitives.asymmetric.rsa.generate_private_key(..., key_size=$VALUE, ...)CODE
CRITICALtests/rules/tainted-file-path.yaml10 org.apache.commons.io.FilenameUtils.getName(...) to only retrieve the fileCODE
CRITICALperf/r2c-rules/r2c-security-audit.yml1055 method such as org.apache.commons.io.FilenameUtils.getName(...) to onlyCODE
CRITICALperf/r2c-rules/r2c-security-audit.yml2020 - pattern: java.nio.file.Files.setPosixFilePermissions($FILE, java.nio.file.attribute.PosixFilePermissions.fromStrCODE
CRITICALperf/r2c-rules/r2c-security-audit.yml2022 $TYPE $P = java.nio.file.attribute.PosixFilePermissions.fromString("=~/(^......r..$)|(^.......w.$)|(^........xCODE
CRITICALperf/r2c-rules/r2c-security-audit.yml2418 method such as org.apache.commons.io.FilenameUtils.getName(...) to onlyCODE
CRITICALperf/r2c-rules/r2c-security-audit.yml3800 pattern: cryptography.hazmat.primitives.ciphers.algorithms.Blowfish(...)CODE
CRITICALperf/r2c-rules/r2c-security-audit.yml3815 pattern: cryptography.hazmat.primitives.ciphers.algorithms.IDEA(...)CODE
CRITICALperf/r2c-rules/r2c-security-audit.yml3830 pattern: cryptography.hazmat.primitives.ciphers.algorithms.ARC4(...)CODE
CRITICALperf/r2c-rules/r2c-security-audit.yml3846 pattern: cryptography.hazmat.primitives.ciphers.modes.ECB(...)CODE
CRITICALperf/r2c-rules/r2c-security-audit.yml3899 - pattern-inside: cryptography.hazmat.primitives.asymmetric.ec.generate_private_key(...)CODE
CRITICALperf/r2c-rules/r2c-ci.yml556 method such as org.apache.commons.io.FilenameUtils.getName(...) to onlyCODE
CRITICALperf/r2c-rules/r2c-ci.yml891 method such as org.apache.commons.io.FilenameUtils.getName(...) to onlyCODE
CRITICALperf/r2c-rules/r2c-ci.yml1784 pattern: cryptography.hazmat.primitives.ciphers.algorithms.Blowfish(...)CODE
CRITICALperf/r2c-rules/r2c-ci.yml1799 pattern: cryptography.hazmat.primitives.ciphers.algorithms.IDEA(...)CODE
CRITICALperf/r2c-rules/r2c-ci.yml1814 pattern: cryptography.hazmat.primitives.ciphers.algorithms.ARC4(...)CODE
CRITICALperf/r2c-rules/r2c-ci.yml1830 pattern: cryptography.hazmat.primitives.ciphers.modes.ECB(...)CODE
CRITICALperf/r2c-rules/r2c-ci.yml1883 - pattern-inside: cryptography.hazmat.primitives.asymmetric.ec.generate_private_key(...)CODE
CRITICALperf/r2c-rules/java.yml16 method such as org.apache.commons.io.FilenameUtils.getName(...) to onlyCODE
Unused Imports188 hits · 148 pts
SeverityFileLineSnippetContext
LOWtests/patterns/python/wildcard_qualified.py1CODE
LOWtests/patterns/python/already_resolved_with_wildcard.py2CODE
LOWtests/patterns/python/misc_import.py2CODE
LOWtests/patterns/python/misc_import.py4CODE
LOWtests/patterns/python/scoped_wildcard.py11CODE
LOWtests/patterns/python/import_negatives.py2CODE
LOWtests/patterns/python/import_negatives.py4CODE
LOWtests/patterns/python/import_negatives.py6CODE
LOWtests/patterns/python/import_negatives2.py2CODE
LOWtests/patterns/python/import_negatives2.py4CODE
LOWtests/patterns/python/import_negatives2.py6CODE
LOWtests/patterns/python/import_metavar_fullpath.py6CODE
LOWtests/patterns/python/import_metavar_fullpath.py8CODE
LOWtests/patterns/python/import_metavar_fullpath.py10CODE
LOWtests/patterns/python/import_metavar_fullpath.py12CODE
LOWtests/patterns/python/import_metavar_fullpath.py14CODE
LOWtests/patterns/python/import_metavar_fullpath.py16CODE
LOWtests/patterns/python/misc_regression1.py1CODE
LOWtests/patterns/python/imports.py3CODE
LOWtests/patterns/python/imports.py6CODE
LOWtests/patterns/python/imports.py8CODE
LOWtests/patterns/python/imports.py11CODE
LOWtests/patterns/python/imports.py12CODE
LOWtests/patterns/python/imports.py12CODE
LOWtests/patterns/python/imports.py14CODE
LOWtests/patterns/python/imports.py14CODE
LOWtests/patterns/python/imports.py16CODE
LOWtests/patterns/python/imports.py16CODE
LOWtests/patterns/python/imports.py20CODE
LOWtests/patterns/python/imports.py21CODE
LOWtests/patterns/python/imports.py22CODE
LOWtests/patterns/python/imports.py23CODE
LOWtests/patterns/python/imports.py25CODE
LOWtests/patterns/python/imports.py26CODE
LOWtests/patterns/python/imports.py27CODE
LOWtests/patterns/python/imports.py28CODE
LOWtests/patterns/python/imports.py29CODE
LOWtests/patterns/python/imports.py30CODE
LOWtests/patterns/python/imports.py31CODE
LOWtests/patterns/python/imports.py32CODE
LOWtests/patterns/python/imports.py33CODE
LOWtests/patterns/python/imports.py36CODE
LOWtests/patterns/python/imports.py36CODE
LOWtests/patterns/python/imports.py39CODE
LOWtests/patterns/python/imports.py39CODE
LOWtests/patterns/python/imports.py42CODE
LOWtests/patterns/python/imports.py45CODE
LOWtests/patterns/python/imports.py46CODE
LOWtests/patterns/python/imports.py47CODE
LOWtests/patterns/python/imports.py48CODE
LOWtests/patterns/python/imports.py50CODE
LOWtests/patterns/python/imports.py51CODE
LOWtests/patterns/python/imports.py52CODE
LOWtests/patterns/python/imports.py53CODE
LOWtests/patterns/python/imports.py54CODE
LOWtests/patterns/python/imports.py55CODE
LOWtests/patterns/python/imports.py56CODE
LOWtests/patterns/python/imports.py57CODE
LOWtests/patterns/python/imports.py62CODE
LOWtests/patterns/python/imports.py62CODE
128 more matches not shown…
Excessive Try-Catch Wrapping119 hits · 116 pts
SeverityFileLineSnippetContext
LOWCHANGELOG.md2763 except Exception:CODE
LOWCHANGELOG.md10297 except Exception:CODE
LOWtests/patterns/python/deep_try.py5 except Exception:CODE
LOWtests/patterns/python/cp_exception.py5 except Exception as e:CODE
LOWtests/patterns/python/cp_exception.py19 except Exception as e:CODE
LOWtests/patterns/python/cp_exception.py31 except Exception as e:CODE
LOWtests/patterns/python/cp_exception.py45 except Exception as e:CODE
LOWtests/patterns/python/cp_exception.py62 except Exception as e:CODE
LOWtests/patterns/python/cp_exception.py75 except Exception as e:CODE
LOWtests/patterns/python/misc_exn.py5 except Exception:CODE
LOWtests/rules/taint_exception.py14 except Exception as e:CODE
LOWtests/rules/taint_exception.py25 except Exception as e:CODE
LOWtests/rules/taint_exception.py59 except Exception as e:CODE
LOWtests/rules/taint_exception.py70 except Exception as e:CODE
LOWtests/rules/taint_exception.py98 except Exception as e:CODE
LOWtests/rules/taint_exception.py115 except Exception as e:CODE
LOWtests/rules/taint_exception.py131 except Exception as e:CODE
LOWtests/rules/taint_exception.py148 except Exception as e:CODE
LOWtests/rules/taint_exception.py171 except Exception as e:CODE
LOWtests/rules/taint_exception.py185 except Exception as e:CODE
LOWtests/rules/taint_clean_in_try_no_finally.py5 except Exception:CODE
LOWtests/parsing/python/as_pattern.py3except Exception as e:CODE
LOWcli/setup.py41 except Exception:CODE
MEDIUMcli/setup.py30def linux_detect_libc():CODE
LOWcli/tests/default/unit/test_error_handler.py185 except Exception:CODE
LOWcli/tests/default/unit/test_error_handler.py223 except Exception:CODE
LOWcli/tests/default/unit/test_error_handler.py254 except Exception:CODE
LOWcli/src/semdep/package_restrictions.py59 except Exception as e:CODE
LOWcli/src/semdep/parsers/util.py92 except Exception as e:CODE
LOWcli/src/semdep/parsers/util.py382 except Exception as e:CODE
LOWcli/src/semdep/parsers/poetry.py281 except Exception as e:CODE
MEDIUMcli/src/semgrep/metrics.py672def gather_click_params(self) -> None:CODE
LOWcli/src/semgrep/metrics.py234 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py243 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py249 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py423 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py431 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py439 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py445 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py451 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py457 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py463 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py470 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py610 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py619 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py628 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py637 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py260 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py286 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py298 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py339 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py348 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py383 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py492 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py512 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py531 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py555 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py594 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py685 except Exception as e:CODE
LOWcli/src/semgrep/metrics.py736 except Exception as e:CODE
59 more matches not shown…
Self-Referential Comments38 hits · 109 pts
SeverityFileLineSnippetContext
MEDIUMsemgrep.yml1# This file contains Semgrep rules. See https://semgrep.dev for more info.COMMENT
MEDIUMsemgrep.yml8# This file is also used in CI, see .circleci/config.ymlCOMMENT
MEDIUMcli/tests/default/unit/test_saved_scan_config.py53 # Create a handler that will dump the config when handling a scan responseCOMMENT
MEDIUMcli/tests/default/unit/test_saved_scan_config.py62 # Create a second handler that loads the saved config via start_scanCOMMENT
MEDIUMcli/tests/default/unit/test_symbol_analysis.py169 # Create a Java file and gradle lockfileCOMMENT
MEDIUMcli/tests/default/unit/test_symbol_analysis.py553 # Create a subproject directory but scan a different directoryCOMMENT
MEDIUMcli/tests/default/e2e-other/parsers/test_yarn.py297 """# This file is generated by running "yarn install" inside your project.STRING
MEDIUMcli/tests/default/e2e-other/parsers/test_yarn.py405 """# This file is generated by running "yarn install" inside your project.STRING
MEDIUMcli/tests/default/e2e/test_ignores.py29 # This file is included by the .semgrepignore above.COMMENT
MEDIUMcli/tests/default/e2e/test_diff_scan_preserves_repo.py51 # Create the rule file (untracked)COMMENT
MEDIUM…fault/e2e/targets/parse_metrics/partial-parse-error.rb193 # This method is called to process HTTP requestsCOMMENT
MEDIUMcli/tests/default/e2e/targets/parse_metrics/ok.rb33 # Create an instance of the Sensu client process, start theCOMMENT
MEDIUMcli/tests/default/e2e/targets/parse_metrics/ok.rb57 # Create a Sensu client keepalive payload, to be sent over theCOMMENT
MEDIUMcli/tests/default/e2e/targets/parse_metrics/ok.rb125 # Create an in progress key for a check, used to determine if anCOMMENT
MEDIUMcli/tests/default/e2e/targets/parse_metrics/ok.rb377 # Create a check execution proc, used to execute standaloneCOMMENT
MEDIUMcli/tests/default/e2e/targets/parse_metrics/ok.rb560 # Create a check result intended for deregistering a client.COMMENT
MEDIUM…default/e2e/targets/dependency_aware/dart/pubspec.yaml66# The following section is specific to Flutter packages.COMMENT
MEDIUMcli/src/semdep/parsers/composer.py17# Import necessary modules and classesCOMMENT
MEDIUMcli/src/semdep/parsers/util.py76 """This class is a callable wrapper around a lockfile and manifest parserSTRING
MEDIUMcli/src/semdep/parsers/yarn.py302# This file is generated by running "yarn install" inside your project.COMMENT
MEDIUMcli/src/semdep/matchers/pip_requirements.py178 # Create a subproject from each group of requirements files and the corresponding manifestCOMMENT
MEDIUMcli/src/semdep/external/packaging/tags.py2# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMcli/src/semdep/external/packaging/version.py2# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMcli/src/semdep/external/packaging/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMcli/src/semdep/external/packaging/utils.py2# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMcli/src/semdep/external/packaging/_structures.py2# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMcli/src/semdep/external/packaging/__about__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMcli/src/semdep/external/packaging/specifiers.py2# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMcli/src/semgrep/profile_manager.py25 # This method is an even more rudimentary tool for profilingCOMMENT
MEDIUMcli/src/semgrep/test.py13# This file is DEPRECATED! Please modify instead osemgrep test inCOMMENT
MEDIUMcli/src/semgrep/join_rule.py557 # Create a model map. This allows dynamically creating DB tables basedCOMMENT
MEDIUMcli/src/semgrep/output_extra.py22# This class is easily extendable if we want to add more information to the CLI outputCOMMENT
MEDIUMcli/src/semgrep/output.py133# This class is the internal representation of OutputSettings below.COMMENT
MEDIUMcli/src/semgrep/mcp/server.py255 # Create a temporary directoryCOMMENT
MEDIUMcli/src/semgrep/console_scripts/entrypoint.py2# This file is the Semgrep CLI entry point of the Semgrep pip package,COMMENT
MEDIUMcli/src/semgrep/console_scripts/pysemgrep.py16# This file is not part of the Python 'semgrep' package; it's a script.COMMENT
MEDIUMcli/src/semgrep/commands/mcp.py185 # Create a fast MCP serverSTRING
MEDIUMcli/src/semgrep/external/git_url_parser.py1# This file is forked from https://github.com/coala/git-url-parse/blob/master/giturlparse/parser.pyCOMMENT
Deep Nesting97 hits · 92 pts
SeverityFileLineSnippetContext
LOWcli/setup.py76CODE
LOWcli/tests/conftest.py313CODE
LOWcli/tests/conftest.py425CODE
LOWcli/tests/default/unit/test_semgrep_test.py50CODE
LOWcli/tests/default/e2e-other/test_ssc.py610CODE
LOWcli/src/semdep/golang_version.py226CODE
LOWcli/src/semdep/golang_version.py332CODE
LOWcli/src/semdep/package_restrictions.py30CODE
LOWcli/src/semdep/maven_version.py98CODE
LOWcli/src/semdep/maven_version.py138CODE
LOWcli/src/semdep/parsers/pnpm.py480CODE
LOWcli/src/semdep/parsers/composer.py61CODE
LOWcli/src/semdep/parsers/go_mod.py107CODE
LOWcli/src/semdep/parsers/pom_tree.py91CODE
LOWcli/src/semdep/parsers/pubspec_lock.py39CODE
LOWcli/src/semdep/matchers/gradle.py98CODE
LOWcli/src/semdep/external/packaging/tags.py314CODE
LOWcli/src/semdep/external/packaging/tags.py346CODE
LOWcli/src/semdep/external/packaging/version.py197CODE
LOWcli/src/semdep/external/packaging/version.py394CODE
LOWcli/src/semdep/external/packaging/_manylinux.py267CODE
LOWcli/src/semdep/external/packaging/specifiers.py752CODE
LOWcli/src/semgrep/dependency_aware_rule.py148CODE
LOWcli/src/semgrep/dependency_aware_rule.py333CODE
LOWcli/src/semgrep/scan_report.py246CODE
LOWcli/src/semgrep/scan_report.py259CODE
LOWcli/src/semgrep/metrics.py301CODE
LOWcli/src/semgrep/subproject.py138CODE
LOWcli/src/semgrep/subproject.py160CODE
LOWcli/src/semgrep/subproject.py176CODE
LOWcli/src/semgrep/subproject.py399CODE
LOWcli/src/semgrep/error_location.py162CODE
LOWcli/src/semgrep/error.py249CODE
LOWcli/src/semgrep/error.py563CODE
LOWcli/src/semgrep/error.py565CODE
LOWcli/src/semgrep/symbol_analysis.py87CODE
LOWcli/src/semgrep/symbol_analysis.py201CODE
LOWcli/src/semgrep/rule_match.py516CODE
LOWcli/src/semgrep/rule_match.py579CODE
LOWcli/src/semgrep/test.py161CODE
LOWcli/src/semgrep/core_runner.py282CODE
LOWcli/src/semgrep/core_runner.py880CODE
LOWcli/src/semgrep/core_runner.py966CODE
LOWcli/src/semgrep/run_scan.py271CODE
LOWcli/src/semgrep/run_scan.py405CODE
LOWcli/src/semgrep/run_scan.py482CODE
LOWcli/src/semgrep/run_scan.py700CODE
LOWcli/src/semgrep/run_scan.py971CODE
LOWcli/src/semgrep/run_scan.py1034CODE
LOWcli/src/semgrep/run_scan.py1258CODE
LOWcli/src/semgrep/target_manager.py96CODE
LOWcli/src/semgrep/target_manager.py239CODE
LOWcli/src/semgrep/target_manager.py302CODE
LOWcli/src/semgrep/target_manager.py1192CODE
LOWcli/src/semgrep/join_rule.py140CODE
LOWcli/src/semgrep/rpc.py186CODE
LOWcli/src/semgrep/engine.py45CODE
LOWcli/src/semgrep/engine.py130CODE
LOWcli/src/semgrep/rule.py277CODE
LOWcli/src/semgrep/rule.py295CODE
37 more matches not shown…
Fake / Example Data78 hits · 66 pts
SeverityFileLineSnippetContext
LOWtests/perf/timeout.js749 if (input.val() == input.attr('placeholder')) {CODE
LOWtests/perf/timeout.js751 input.removeClass('placeholder');CODE
LOWtests/perf/timeout.js755 if (input.val() == '' || input.val() == input.attr('placeholder')) {CODE
LOWtests/perf/timeout.js756 input.addClass('placeholder');CODE
LOWtests/perf/timeout.js757 input.val(input.attr('placeholder'));CODE
LOWtests/perf/timeout.js980 if (input.val() == input.attr('placeholder')) {CODE
LOWtests/perf/timeout.js1091 return !('placeholder' in i);CODE
LOWtests/perf/timeout.js1137 if (!$(cartIdField).hasClass('placeholder') && $("input[name='customerId']").val().length > 0) {CODE
LOWtests/perf/timeout.js1177 if (!$(el).hasClass('placeholder')) {CODE
LOWcli/tests/conftest.py497 env_["SEMGREP_APP_TOKEN"] = "fake_token"CODE
LOWcli/tests/default/e2e-other/test_login.py46 # for the input=fake_key to work?COMMENT
LOWcli/tests/default/e2e-other/test_login.py49 fake_key = "key123"CODE
LOWcli/tests/default/e2e-other/test_login.py56 input=fake_key,CODE
LOWcli/tests/default/e2e-other/test_login.py70 fake_key = "key123"CODE
LOWcli/tests/default/e2e-other/test_login.py84 env={"SEMGREP_APP_TOKEN": fake_key},CODE
LOWcli/tests/default/e2e-other/test_login.py110 fake_key = "key123"CODE
LOWcli/tests/default/e2e-other/test_login.py122 env={"SEMGREP_APP_TOKEN": fake_key},CODE
LOWcli/tests/default/e2e-other/test_ci.py1332# env["SEMGREP_APP_TOKEN"] = "fake-key-from-tests"COMMENT
LOWcli/tests/default/e2e-other/test_ci.py1024 env["SEMGREP_APP_TOKEN"] = "fake-key-from-tests"CODE
LOWcli/tests/default/e2e-other/test_ci.py1196 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py1493 env["SEMGREP_APP_TOKEN"] = "fake-key-from-tests"CODE
LOWcli/tests/default/e2e-other/test_ci.py1644 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py1685 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py1715 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py1746 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py1809 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py1849 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py1902 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py1939 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py1979 "SEMGREP_APP_TOKEN": "fake-key-from-tests",CODE
LOWcli/tests/default/e2e-other/test_ci.py2008 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2045 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2067 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2096 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2115 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2134 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2169 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2190 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2213 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2256 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2296 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2330 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2349 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2382 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2401 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2419 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2438 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2492 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2534 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2584 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2658 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2727 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2809 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2848 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2894 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py2993 env={"SEMGREP_APP_TOKEN": "fake-key-from-tests"},CODE
LOWcli/tests/default/e2e-other/test_ci.py3089 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py3133 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py3323 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
LOWcli/tests/default/e2e-other/test_ci.py3537 env={"SEMGREP_APP_TOKEN": "fake_key"},CODE
18 more matches not shown…
AI Slop Vocabulary29 hits · 65 pts
SeverityFileLineSnippetContext
MEDIUM.pre-commit-hooks.yaml14 # for pre-commit. Essentially, setup.py runs 'pip install semgrep==0.xxx.yyy'.COMMENT
MEDIUMtests/perf/l10000.js3514 // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axesCOMMENT
MEDIUMtests/perf/l10000.js3838 // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axesCOMMENT
MEDIUMtests/perf/three.js3514 // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axesCOMMENT
MEDIUMtests/perf/three.js3838 // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axesCOMMENT
MEDIUMtests/perf/bloom/l10000.js3515 // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axesCOMMENT
MEDIUMtests/perf/bloom/l10000.js3839 // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axesCOMMENT
MEDIUMcli/tests/default/e2e/targets/parse_metrics/ok.rb143 # tokens. Hook commands may expect/read and utilize JSONCOMMENT
MEDIUMcli/tests/default/e2e/targets/parse_metrics/ok.rb251 # method as a parameter, the extension may utilize it. ThisCOMMENT
MEDIUMcli/tests/default/e2e/targets/bad/invalid_c_long.c1/*;--------------------------------------------------------------------------;;This program, "bzip2", the associated libCOMMENT
LOWcli/src/semdep/parsers/gradle.py105 # support for manifest parsing. In that case just use the lockfile.COMMENT
LOWcli/src/semdep/external/packaging/specifiers.py500 # version. If it's not we can short circuit and just return False nowSTRING
LOWcli/src/semdep/external/packaging/specifiers.py526 # version. If it's not we can short circuit and just return False nowSTRING
LOWcli/src/semdep/external/packaging/specifiers.py707 # then we'll just return None since we don't know if this should haveSTRING
MEDIUMcli/src/semgrep/dependency_aware_rule.py306 # TODO: associate these in a more robust way. This currentlyCOMMENT
LOWcli/src/semgrep/git.py420 # If we already know that the base commit is the merge base, just returnSTRING
LOWcli/src/semgrep/error.py541# TODO: generalize in a SemgrepCliError and just pass the level, code and type_COMMENT
LOWcli/src/semgrep/rpc.py135 # date, let's just use a catch-all. In the end it doesn't really matterCOMMENT
LOWcli/src/semgrep/rule.py339 # /weird/), just return the empty string, and we'll hash based on rule id +COMMENT
MEDIUMcli/src/semgrep/resolve_dependency_source.py460 # TODO: Reimplement this once more robust error handling for lockfileless resolution is implementedCOMMENT
LOWcli/src/semgrep/mcp/semgrep.py235 # if they exist on the local filesystem, we could just pass the pathsCOMMENT
LOWcli/src/semgrep/console_scripts/entrypoint.py18# semgrep-core, but it is simple from Python because you can simply useCOMMENT
MEDIUMcli/src/semgrep/console_scripts/entrypoint.py22# Again, it is simpler to use a Python script and leverage importlib.resources.COMMENT
MEDIUMcli/src/semgrep/console_scripts/entrypoint.py172 # test harness, etc.), set NO_COLOR so cmdliner reverts to plain output.COMMENT
LOWcli/src/semgrep/semgrep_interfaces/rule_schema_v1.yaml281 # I would normally just use `allOf`, but since it doensn't short circuit,COMMENT
MEDIUMcli/src/semgrep/semgrep_interfaces/generate.py80# Constructors are sorted by increasing maturity to facilitate meaningfulCOMMENT
LOWcli/src/semgrep/commands/ci.py1047 # settings have been passed. So we can just use the "normal"COMMENT
MEDIUMcli/src/semgrep/commands/scan.py897 # I wish there was an easy way to leverage the engine_params from theCOMMENT
MEDIUMperf/configs/ci_small_repos.yaml85 # For more comprehensive rule timing informationCOMMENT
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHcli/tests/default/unit/test_yaml_parsing.py0rules: - id: rule_id pattern: | $x == $x $y == $y languages: [python] severity: info message: badSTRING
HIGHcli/tests/default/unit/test_rule_match.py0rules: - id: rule_id pattern: | $x == $x $y == $y languages: [python] severity: info message: badSTRING
HIGHcli/tests/default/unit/test_match_hashes.py0rules: - id: rule_id pattern: | $x == $x $y == $y languages: [python] severity: info message: badSTRING
HIGH…lt/e2e/targets/autofix/django-none-password-default.py0creates and saves a poster with the given email and password.STRING
HIGH…o-none-password-default.py-text-not-dryrun/results.txt0creates and saves a poster with the given email and password.STRING
HIGH…jango-none-password-default.py-text-dryrun/results.txt0creates and saves a poster with the given email and password.STRING
Cross-Language Confusion5 hits · 24 pts
SeverityFileLineSnippetContext
HIGHcli/tests/default/e2e-other/parsers/test_swiftpm.py342 "branch": null,STRING
HIGHcli/tests/default/e2e-other/parsers/test_swiftpm.py351 "branch": null,STRING
HIGHcli/tests/default/e2e-other/parsers/test_swiftpm.py360 "branch": null,STRING
HIGHcli/src/semgrep/mcp/server.py1201 - Run: `semgrep install-semgrep-pro || true`CODE
HIGHcli/src/semgrep/mcp/hooks/post_tool.py43 # "decision": "block"|undefined,COMMENT
Cross-Language Confusion (JS/TS)4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHtests/patterns/js/dots_stmts.js5 print("do stuff");CODE
HIGHtests/patterns/js/deep_exprstmt.js10 print(bar());CODE
HIGHtests/patterns/ts/deep_exprstmt.ts10 print(bar());CODE
HIGHtests/patterns/ts/dots_stmts.ts5 print("do stuff");CODE
Redundant / Tautological Comments13 hits · 19 pts
SeverityFileLineSnippetContext
LOWcli/tests/default/mcp/test_create_temp_files.py40 # Check if temp directory was createdCOMMENT
LOWcli/tests/default/mcp/test_create_temp_files.py44 # Check if files were created with correct contentCOMMENT
LOWcli/tests/default/mcp/test_create_temp_files.py71 # Check if temp directory was createdCOMMENT
LOWcli/tests/default/mcp/test_create_temp_files.py101 # Check if temp directory was createdCOMMENT
LOWcli/tests/default/e2e-other/test_ci.py2940 # Check if we should mimic an existing settings file via simulationCOMMENT
LOWcli/src/semdep/golang_version.py155 ): # Check if anything exists after the core version specCODE
LOWcli/src/semdep/golang_version.py251 # Check if the identifier is a numberCOMMENT
LOWcli/src/semdep/matchers/pip_requirements.py127 # Check if the lockfile is in a 'requirements' directoryCOMMENT
LOWcli/src/semgrep/scan_report.py513 # Check if any secret rule has the generic secrets AI rulesetCOMMENT
LOWcli/src/semgrep/main.py95 # Check if any of the exclusionary commands are providedCOMMENT
LOWcli/src/semgrep/mcp/server.py212 # Check if normalized path is still absoluteCOMMENT
LOW.github/workflows/sync-with-PRO.yml64 # Check if any commits are already synced from ProCOMMENT
LOWsrc/main/flags.sh46# Check if SEMGREP_NIX_BUILD is not setCOMMENT
AI Structural Patterns21 hits · 18 pts
SeverityFileLineSnippetContext
LOWtests/tainting_rules/python/simpl_django_redirect.py36CODE
LOWtests/rules/metavar_pattern_open_redirect.py52CODE
LOWtests/rules/sym_prop_open_redirect.py52CODE
LOWtests/perf/timeout.py70CODE
LOWtests/perf/force_timeout.py70CODE
LOWtests/perf/timeout_gracefully.py66CODE
LOWcli/tests/conftest.py425CODE
LOWcli/tests/fixtures.py48CODE
LOWcli/tests/default/unit/test_scans_v2.py55CODE
LOWcli/tests/default/unit/test_scans_v2.py64CODE
LOWcli/tests/default/e2e-other/test_ci.py3209CODE
LOWcli/tests/default/e2e-other/test_ci.py3403CODE
LOW…tests/default/e2e/targets/equivalence/open_redirect.py66CODE
LOWcli/tests/default/e2e/targets/test_test/long.py66CODE
LOWcli/src/semgrep/rule_match.py576CODE
LOWcli/src/semgrep/core_runner.py575CODE
LOWcli/src/semgrep/run_scan.py1034CODE
LOWcli/src/semgrep/run_scan.py1258CODE
LOWcli/src/semgrep/output.py414CODE
LOWcli/src/semgrep/app/scans.py97CODE
LOWcli/src/semgrep/mcp/server.py629CODE
Slop Phrases5 hits · 10 pts
SeverityFileLineSnippetContext
LOWtests/parsing/cpp/operator_templated3.cpp7 :: don't forget to update hdf5_daa_layer.cu accordinglyCODE
LOWcli/tests/conftest.py501 # so make sure to explicitly delete any ambient CI variables.COMMENT
LOWcli/tests/default/e2e/test_permissions.py90 # We make sure to not run as root since it can read files lackingCOMMENT
MEDIUM…default/e2e/targets/dependency_aware/dart/pubspec.yaml70 # included with your application, so that you can use the icons inCOMMENT
MEDIUMcli/src/semgrep/console_scripts/entrypoint.py39# alt: you can also add '-W ignore::DeprecationWarning' after the python3 above,COMMENT
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHcli/src/semdep/parsers/pnpm.py414 Parses the dependencies of a package in a `pnpm-lock.yaml` file (version >=9.0). In pnpm-lock.yaml files versiSTRING
HIGHcli/src/semgrep/mcp/server.py240 Creates temporary files from code content Args: code_files: List of CodeFile objects Returns: STRING
Modern AI Meta-Vocabulary3 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md134 - [Semgrep Code (SAST)](https://semgrep.dev/products/semgrep-code?utm_medium=readme&utm_source=github&utm_content=semgCODE
MEDIUMcli/README.md134 - [Semgrep Code (SAST)](https://semgrep.dev/products/semgrep-code?utm_medium=readme&utm_source=github&utm_content=semgCODE
MEDIUMcli/tests/default/unit/test_scans_v2.py313# POST-retry orchestration tests (mock _poll_for_config_v2 directly)COMMENT
Dead Code4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMtests/naming/python/scope.py13CODE
MEDIUMtests/naming/python/scope.py14CODE
MEDIUMtests/rules/taint_exception.py8CODE
MEDIUMtests/rules/taint_exception.py53CODE
Modern Structural Boilerplate8 hits · 8 pts
SeverityFileLineSnippetContext
LOWcli/src/semdep/external/packaging/tags.py26logger = logging.getLogger(__name__)CODE
LOWcli/src/semdep/external/packaging/version.py14__all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"]CODE
LOWcli/src/semdep/external/packaging/__init__.py16__all__ = [CODE
LOWcli/src/semdep/external/packaging/__about__.py5__all__ = [CODE
LOWcli/src/semgrep/telemetry.py263 def update_attributes(self, new_attrs: Attributes) -> None:CODE
LOWcli/src/semgrep/app/auth.py23logger = logging.getLogger(__name__)CODE
LOWcli/src/semgrep/app/auth.py94def set_token(token: str) -> None:CODE
LOW…grep/semgrep_interfaces/scripts/jsonschema2protobuf.py19logger = logging.getLogger(__name__)CODE
Synthetic Comment Markers1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHcli/tests/default/unit/test_paths_to_transitivity.py106 This entire paragraph was pretty much generated by Copilot wowSTRING
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWcli/src/semgrep/target_manager.py250 # this print statement we need to check if any target is in aCOMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWcli/src/semgrep/mcp/hooks/inject_secure_defaults.py207 # TODO: implement this hook for WindsurfCOMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWscripts/generate_cheatsheet.py5# Usage:COMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/rules/taint_clean_in_try_no_finally.py1def test_function():CODE