Our run installed semsec in 5 seconds and built it in 1 second; pytest then exited 5 after collecting no tests. Semsec suits developers who already use Semgrep and want additional rules to evaluate against their application. Teams choosing security coverage from a framework label alone should use the reported FastAPI and Django cases to define the input flows and authorization checks they expect their scanner to recognize.
What you can do with semsec
Semsec supplies rule files for Semgrep, including Python web checks, secret scanning and application configuration checks. The semsec README describes Python, JavaScript, Java and PHP rules, alongside checks for Supabase, Next.js and Firebase. The scanner reads your application using the configuration you select. Choosing this repository therefore means choosing additional rules for Semgrep, with the engine and the selected rules remaining separate parts of the scanning workflow.
The README gives separate commands for the whole collection, Python web vulnerabilities and hardcoded secrets. Its Python example selects semsec/python-web-taint.yaml; the secrets example selects semsec/hardcoded-secrets.yaml. It also documents SARIF output through --sarif -o results.sarif. These file choices give an existing Semgrep user a concrete starting point: select checks relevant to the application, record the selected revision, and compare findings with examples whose expected outcomes are already known.
Taint tracking follows input into an operation that could become dangerous, such as a shell command or database query. The README describes sources, sinks and sanitizer exceptions as parts of that process. Those categories explain why framework details matter: an HTTP parameter must enter the analysis through a recognized source, while an authorization check must match the rule's assumptions. The FastAPI and Django reports below describe failures at those particular boundaries.
What people use semsec for
Issue reporters evaluated semsec against FastAPI input handling and Django object authorization. Their reports contain small examples and expected outcomes that help a new user choose regression cases. The FastAPI report names Semgrep 1.187.0, while the Django report distinguishes missed lookups from warnings on permission-checked code. Each account asks a different question about where rules should find a problem and where they should stay silent.
| Who evaluated it | What they did | What they reported |
|---|---|---|
| The reporter of issue #2 | Tested Python taint detection with FastAPI handler parameters and Flask path parameters using Semgrep 1.187.0 | Missed command injection, server-side request forgery and string-built SQL findings |
| The reporter of issue #3 | Evaluated the Django IDOR rule against lookup patterns and permission checks | Missed common lookups and warnings on ownership checks, Django REST Framework permission checks and non-view code |
The FastAPI reporter describes a handler receiving cmd: str and passing it to os.system("ls " + cmd). The reporter says this produced no findings, and describes the same outcome for requests.get(url) and string-built SQL. The Django report concerns insecure direct object references, or IDOR: object access without the required authorization. Together, these reports suggest an evaluation corpus containing unsafe input flows, unchecked object lookups and protected equivalents with explicit expected outcomes.
What happened when we ran it
The checkout was commit 521800c; pytest failed with exit 5 after 2 seconds, recording 0 passed, 0 failed and 0 total tests. Its log says no tests ran in 0.00s. Installation, build and test collection are separate outcomes, and the failed command belongs in the result alongside the successful steps.
| Sandbox step or observation | Recorded result |
|---|---|
| Install | Succeeded in 5 seconds; 35 dependencies recorded; 38 MB on disk |
| Build | Succeeded in 1 second |
| Tests | Failed with exit 5 in 2 seconds; pytest recorded 0 passed, 0 failed, 0 total |
| Test log tail | no tests ran in 0.00s |
| Checkout | 22 files, approximately 168 source lines, 1.7 MB checked out |
| Repository signals | 1 CI workflow file, a tests directory, no Dockerfile |
| Sandbox configuration | 3 CPUs, 8 GB RAM; image label ghcr.io/astral-sh/uv:python3.12-bookworm |
The separate hands-on attempt recorded a failed Compose-file safety step. Its exact error was unsafe repo: none of compose.yaml, compose.yml, docker-compose.yaml, docker-compose.yml exists (rule: a compose file is required). The prerequisite belongs to that deployment route. The README's Docker example runs the Semgrep image directly, mounting application code and a local rules checkout into different container paths.
The November 27 hands-on summary describes deployment with its own Docker Compose and every port bound to 127.0.0.1, while the detailed step records the missing-file failure. The two entries conflict: one labels the attempt deployed, and the other records a failed prerequisite. The teardown record reports ok. The detailed failure is the actionable result for a reader considering the Compose route.
Where people get stuck: loading rules and recognizing inputs
Issue #1 reports a pre-commit configuration that loaded zero rules and a Docker example whose rules directory was absent from the container. The reporter describes the hook passing without scanning anything. The current README uses individual raw rule URLs plus a separate Docker rules mount. The issue table connects each historical complaint to its recorded follow-up, keeping documentation changes separate from the framework reports.
| Report | Reported problem | Recorded follow-up |
|---|---|---|
| Issue #1 | A repository URL loaded zero rules; Docker referenced an unmounted rules directory | Completed in PR #4; the current README lists raw rule URLs and a separate rules mount |
| Issue #2 | FastAPI handler input and Flask path parameters missed as taint sources | Completed in PR #5 |
| Issue #3 | Django lookups missed and protected code flagged | Completed in PR #7 |
| Issue #6 | Rule metadata contradicted the MIT license | SecFathy reports the metadata correction in commit 521800c |
The current pre-commit instructions explicitly say a whole GitHub repository URL loads zero rules and passes. They point to individual raw YAML files and recommend replacing main with a commit SHA. The URLs select files the scanner can load, and the SHA identifies the rules revision used by the hook. A successful exit from the historical repository-URL configuration meant something different from a scan using the intended rule files.
The Docker instructions mount the application at /src and /path/to/semsec at /semsec:ro, then select /semsec/ as the configuration. The local rules path is a placeholder for the reader's checkout. Keeping the mount destination and configuration path aligned addresses the directory mismatch described in issue #1. Application code and rule files occupy separate mounts in the documented command.
Framework support needs examples from your own handlers
Use unsafe and permission-checked examples from your own handlers to evaluate framework coverage; issue #2 reports missed FastAPI input and issue #3 reports warnings on protected Django code. GitHub records issue #2 as completed in PR #5 and issue #3 as completed in PR #7. The reports identify distinct regression targets: handler parameters, path parameters, alternate lookup forms and authorization checks.
The Django reporter lists three missed lookup forms: Invoice.objects.get(id=pk), Invoice.objects.filter(pk=pk).first() and get_object_or_404(Invoice, pk=pk). They also describe warnings on ownership checks using invoice.owner, Django REST Framework's self.check_object_permissions(request, invoice), and non-view code such as management commands or Celery tasks. An evaluation corpus should preserve those differences so each example expresses one expected finding or one expected absence of a finding.
For each handler shape, keep the unsafe example and its protected equivalent together, with the scanner version, rules revision and expected finding recorded. The README's contribution instructions ask for # ruleid: and # ok: examples, providing a repository-native way to express both outcomes. Its documented regression command is semgrep --test --config crypto-secrets.yaml tests/crypto-secrets.py. That command selects a rule file and its corresponding examples; our harness invoked pytest.
The MIT metadata correction has an explicit commit
SecFathy reports that commit 521800c aligned all 262 rules across 13 files with the MIT license. The issue #6 discussion describes the original conflict: repository licensing and rule metadata used different wording, and the metadata appeared in Semgrep output and SARIF. The reported replacement is MIT - Copyright (c) 2026 Robusta Studio. For the open-source community. The maintainer names both the revision and the scope of the correction.
The licensing question concerns the text attached to scanner findings as well as the repository's LICENSE file. The reporter asked whether the rules were MIT because the metadata said All rights reserved. SecFathy's response identifies the replacement wording and says it aligns with LICENSE. Our checkout used the same abbreviated commit identifier, 521800c, connecting the setup measurements to the revision named in that response.
semsec vs Semgrep and Bandit
Semsec supplies rules for Semgrep, while Bandit is a separate Python security linter. The alternatives answer different selection questions: which rules to run through Semgrep, or which scanner workflow to evaluate for Python. The Semgrep README describes a static analysis tool that searches code and enforces standards. The Bandit README describes processing files into syntax trees and running plugins against their nodes.
| Choice | Documented role | Pick it when |
|---|---|---|
| semsec | Security rule files loaded by Semgrep | You want these framework, configuration and secret patterns in an existing Semgrep workflow |
| Semgrep | A static analysis tool that searches code and enforces rules | You want to select or author rules without adopting this collection |
| Bandit | A tool designed to find common security issues in Python code | Your scope is Python security linting through a separate scanner workflow |
For a Python service, reuse the same unsafe and protected examples when evaluating scanner choices, then compare the actual findings and review work. For a repository spanning several languages, start with the relevant language and framework checks. Semsec's README lists rules across four application languages; Bandit's README identifies Python as its target. These documented roles help select an evaluation workflow without assigning a detection ranking to either project.
Repository metadata identifies the checkout's context
The repository metadata records a last push on November 25, 2026, and identifies Python as the primary language. The README describes rules for Python, JavaScript, Java and PHP, so the repository language label and the documented ruleset scope answer different questions. For someone choosing configurations, the named YAML files and framework entries are more specific than the repository's primary-language field.
The harness recorded one CI workflow file and a tests directory in the checkout at 521800c. The README's contribution instructions describe validation with semgrep --validate and regression examples using # ruleid: and # ok: annotations. Those instructions identify the project's documented rule-testing workflow. The recorded pytest command, by comparison, exited 5 with zero collected tests, making its command and collection result essential parts of the setup account.
Questions people ask
Semsec's rules are MIT licensed, and SecFathy reports aligning their metadata in commit 521800c. That answers the licensing question raised in issue #6. The other questions concern loading the intended rules and handling particular framework patterns. The answers below use the README for configuration instructions and attribute framework behavior to the issue reporters who described the examples and their outcomes.
Are semsec's rules licensed under MIT despite the all-rights-reserved metadata?
Commit 521800c is the reported correction aligning rule metadata with MIT. In issue #6, SecFathy says the update covered all 262 rules across 13 files and gives the replacement wording. The question arose because rule metadata and the repository license disagreed. Recording the revision alongside the license keeps an inventory entry connected to the rules that produced the scanner output.
How do I configure semsec in pre-commit so it actually loads and scans rules?
Use individual rule-file URLs for --config, as the current README documents. It explicitly warns that a whole GitHub repository URL loads zero rules and passes, and recommends replacing main with a commit SHA. Its example lists the raw YAML URLs separately, including python-web-taint.yaml and hardcoded-secrets.yaml. These select the files, while the commit SHA fixes their revision.
How do I make semsec's Docker example access its rules directory?
Mount the local rules checkout into the container and select that container path in --config. The README's Docker command mounts /path/to/semsec at /semsec:ro and selects /semsec/, separately from the application's /src mount. The historical complaint concerned /tmp/semsec/ being referenced without a mount. The documented command now includes the rules mount and uses its destination as the configuration path.
Does semsec detect tainted input passed through FastAPI handler parameters or Flask path parameters?
Issue #2 reports missed FastAPI and Flask parameter cases with Semgrep 1.187.0. The reporter's examples describe handler input reaching a shell command, an outbound request and string-built SQL. The reporter also identifies Flask path parameters as missed sources. These examples specify the historical behavior and give a FastAPI or Flask team concrete input shapes to retain when comparing rules revisions.
Why does semsec's Django IDOR rule miss common lookups and flag code with permission checks?
The reporter attributes the behavior to matching objects.get(pk=...) and a check on .user. The original Django report lists alternative lookup forms, ownership checks on another field, DRF permission checks and non-view code. The lookup examples ask whether the rule recognizes object retrieval; the protected examples ask whether it recognizes authorization. Those are separate expected outcomes to record in an application's regression examples.
What we have not tested yet
Our run measured installation, build and a pytest command that collected no tests, rather than detection accuracy. The current pre-commit and Docker instructions, the FastAPI and Django cases, and the README's Semgrep regression command were not exercised in that run. PRs #4, #5 and #7 have identifiable closure links, but their diffs and regression results were not available for this review. Their closure records do not establish which reported cases now pass.
The latest-release lookup is null and does not establish whether a release exists. Actual runtime and operating-system versions require raw toolchain logs; the configured image label alone supplies neither. The 38 MB figure is installed disk footprint rather than runtime memory. The contradictory Compose summary and failed prerequisite do not support a completed deployment claim. Large repositories, throughput, secret-detection accuracy, JavaScript, Java and PHP coverage, and comparisons against the alternatives on identical examples remain outside the measured results.
Production adoption and production reliability were not measured, and this review is not a security audit. Rendered layout, resolved links, related links and recommendation modules also remain outside this text-and-evidence correction. Setup, documentation, community and maturity scores stay unassessed because the recorded outcomes do not support numerical judgments for those dimensions. A useful next result would record findings for known unsafe and permission-checked examples together with the exact scanner version and selected rules revision.


