depquiet 0.3.0__tar.gz
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.
- depquiet-0.3.0/.github/ISSUE_TEMPLATE/bug_report.yml +69 -0
- depquiet-0.3.0/.github/ISSUE_TEMPLATE/feature_request.yml +47 -0
- depquiet-0.3.0/.github/ISSUE_TEMPLATE/template_contribution.yml +53 -0
- depquiet-0.3.0/.github/PULL_REQUEST_TEMPLATE.md +27 -0
- depquiet-0.3.0/.github/workflows/ci.yml +71 -0
- depquiet-0.3.0/.github/workflows/release.yml +36 -0
- depquiet-0.3.0/.gitignore +20 -0
- depquiet-0.3.0/CHANGELOG.md +77 -0
- depquiet-0.3.0/CODE_OF_CONDUCT.md +65 -0
- depquiet-0.3.0/CONTRIBUTING.md +122 -0
- depquiet-0.3.0/LICENSE +21 -0
- depquiet-0.3.0/PKG-INFO +263 -0
- depquiet-0.3.0/README.md +228 -0
- depquiet-0.3.0/SECURITY.md +44 -0
- depquiet-0.3.0/action.yml +116 -0
- depquiet-0.3.0/benchmarks/RESULTS.md +31 -0
- depquiet-0.3.0/benchmarks/build_fixtures.py +322 -0
- depquiet-0.3.0/benchmarks/fixtures/grype-python-container.json +130 -0
- depquiet-0.3.0/benchmarks/fixtures/grype-python-container.source.json +4 -0
- depquiet-0.3.0/benchmarks/fixtures/npm-express-app.json +275 -0
- depquiet-0.3.0/benchmarks/fixtures/npm-express-app.source.json +5 -0
- depquiet-0.3.0/benchmarks/fixtures/pip-django-app.json +124 -0
- depquiet-0.3.0/benchmarks/fixtures/pip-django-app.source.json +4 -0
- depquiet-0.3.0/benchmarks/fixtures/trivy-node-container.json +90 -0
- depquiet-0.3.0/benchmarks/fixtures/trivy-node-container.source.json +4 -0
- depquiet-0.3.0/benchmarks/run_benchmark.py +207 -0
- depquiet-0.3.0/examples/dependabot-alerts/README.md +33 -0
- depquiet-0.3.0/examples/dependabot-alerts/alerts.json +82 -0
- depquiet-0.3.0/examples/node-api/.depquiet.yaml +6 -0
- depquiet-0.3.0/examples/node-api/README.md +24 -0
- depquiet-0.3.0/examples/node-api/audit-output.json +59 -0
- depquiet-0.3.0/examples/node-api/index.js +12 -0
- depquiet-0.3.0/examples/node-api/package.json +15 -0
- depquiet-0.3.0/examples/python-web/README.md +21 -0
- depquiet-0.3.0/examples/python-web/app.py +16 -0
- depquiet-0.3.0/examples/python-web/audit-output.json +36 -0
- depquiet-0.3.0/examples/python-web/requirements.txt +3 -0
- depquiet-0.3.0/examples/trivy-container/README.md +27 -0
- depquiet-0.3.0/examples/trivy-container/trivy-output.json +53 -0
- depquiet-0.3.0/pyproject.toml +103 -0
- depquiet-0.3.0/src/depquiet/__init__.py +3 -0
- depquiet-0.3.0/src/depquiet/__main__.py +5 -0
- depquiet-0.3.0/src/depquiet/cli.py +179 -0
- depquiet-0.3.0/src/depquiet/config.py +146 -0
- depquiet-0.3.0/src/depquiet/engine.py +225 -0
- depquiet-0.3.0/src/depquiet/filters/__init__.py +8 -0
- depquiet-0.3.0/src/depquiet/filters/devdep.py +22 -0
- depquiet-0.3.0/src/depquiet/filters/epss.py +93 -0
- depquiet-0.3.0/src/depquiet/filters/reachability.py +186 -0
- depquiet-0.3.0/src/depquiet/filters/templates.py +163 -0
- depquiet-0.3.0/src/depquiet/models.py +106 -0
- depquiet-0.3.0/src/depquiet/output.py +120 -0
- depquiet-0.3.0/src/depquiet/parsers/__init__.py +6 -0
- depquiet-0.3.0/src/depquiet/parsers/dependabot.py +111 -0
- depquiet-0.3.0/src/depquiet/parsers/grype.py +115 -0
- depquiet-0.3.0/src/depquiet/parsers/npm.py +136 -0
- depquiet-0.3.0/src/depquiet/parsers/pip.py +92 -0
- depquiet-0.3.0/src/depquiet/parsers/trivy.py +115 -0
- depquiet-0.3.0/src/depquiet/py.typed +0 -0
- depquiet-0.3.0/src/depquiet/sarif.py +154 -0
- depquiet-0.3.0/templates/dismiss/axios-ssrf-server.yaml +6 -0
- depquiet-0.3.0/templates/dismiss/cryptography-null-dereference.yaml +6 -0
- depquiet-0.3.0/templates/dismiss/express-open-redirect.yaml +6 -0
- depquiet-0.3.0/templates/dismiss/ip-ssrf-private.yaml +7 -0
- depquiet-0.3.0/templates/dismiss/json5-prototype-pollution.yaml +7 -0
- depquiet-0.3.0/templates/dismiss/prototype-pollution-lodash.yaml +9 -0
- depquiet-0.3.0/templates/dismiss/regex-dos-semver.yaml +6 -0
- depquiet-0.3.0/templates/dismiss/requests-leaking-proxy-auth.yaml +6 -0
- depquiet-0.3.0/templates/dismiss/webpack-dev-middleware.yaml +6 -0
- depquiet-0.3.0/tests/__init__.py +0 -0
- depquiet-0.3.0/tests/fixtures/npm_audit.json +99 -0
- depquiet-0.3.0/tests/fixtures/pip_audit.json +47 -0
- depquiet-0.3.0/tests/test_config.py +265 -0
- depquiet-0.3.0/tests/test_core.py +489 -0
- depquiet-0.3.0/tests/test_coverage.py +1139 -0
- depquiet-0.3.0/tests/test_coverage_gaps.py +238 -0
- depquiet-0.3.0/tests/test_dependabot.py +218 -0
- depquiet-0.3.0/tests/test_grype.py +264 -0
- depquiet-0.3.0/tests/test_reachability.py +169 -0
- depquiet-0.3.0/tests/test_trivy.py +400 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Something isn't working correctly
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for reporting a bug! Please fill out the sections below so we can reproduce and fix it.
|
|
9
|
+
|
|
10
|
+
- type: input
|
|
11
|
+
id: version
|
|
12
|
+
attributes:
|
|
13
|
+
label: depquiet version
|
|
14
|
+
description: Run `depquiet --version`
|
|
15
|
+
placeholder: "0.1.0"
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
|
|
19
|
+
- type: input
|
|
20
|
+
id: python-version
|
|
21
|
+
attributes:
|
|
22
|
+
label: Python version
|
|
23
|
+
description: Run `python --version`
|
|
24
|
+
placeholder: "3.13.0"
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
|
|
28
|
+
- type: input
|
|
29
|
+
id: os
|
|
30
|
+
attributes:
|
|
31
|
+
label: Operating System
|
|
32
|
+
placeholder: "macOS 15.1 / Ubuntu 24.04 / Windows 11"
|
|
33
|
+
validations:
|
|
34
|
+
required: true
|
|
35
|
+
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: what-happened
|
|
38
|
+
attributes:
|
|
39
|
+
label: What happened?
|
|
40
|
+
description: Describe the bug. What did you expect to happen?
|
|
41
|
+
validations:
|
|
42
|
+
required: true
|
|
43
|
+
|
|
44
|
+
- type: textarea
|
|
45
|
+
id: reproduce
|
|
46
|
+
attributes:
|
|
47
|
+
label: Steps to reproduce
|
|
48
|
+
description: The exact commands you ran
|
|
49
|
+
render: bash
|
|
50
|
+
validations:
|
|
51
|
+
required: true
|
|
52
|
+
|
|
53
|
+
- type: textarea
|
|
54
|
+
id: output
|
|
55
|
+
attributes:
|
|
56
|
+
label: Error output
|
|
57
|
+
description: Paste the full terminal output
|
|
58
|
+
render: text
|
|
59
|
+
validations:
|
|
60
|
+
required: false
|
|
61
|
+
|
|
62
|
+
- type: textarea
|
|
63
|
+
id: audit-json
|
|
64
|
+
attributes:
|
|
65
|
+
label: Audit JSON (if relevant)
|
|
66
|
+
description: Paste or attach the audit JSON that triggered the bug. Sanitize private package names if needed.
|
|
67
|
+
render: json
|
|
68
|
+
validations:
|
|
69
|
+
required: false
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature or improvement
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Have an idea to make depquiet better? We'd love to hear it.
|
|
9
|
+
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: problem
|
|
12
|
+
attributes:
|
|
13
|
+
label: Problem
|
|
14
|
+
description: What problem does this feature solve? What's frustrating today?
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: solution
|
|
20
|
+
attributes:
|
|
21
|
+
label: Proposed solution
|
|
22
|
+
description: How do you imagine this working?
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
|
|
26
|
+
- type: textarea
|
|
27
|
+
id: alternatives
|
|
28
|
+
attributes:
|
|
29
|
+
label: Alternatives considered
|
|
30
|
+
description: Any other approaches you've thought about?
|
|
31
|
+
validations:
|
|
32
|
+
required: false
|
|
33
|
+
|
|
34
|
+
- type: dropdown
|
|
35
|
+
id: area
|
|
36
|
+
attributes:
|
|
37
|
+
label: Area
|
|
38
|
+
options:
|
|
39
|
+
- New filter
|
|
40
|
+
- New parser (package manager)
|
|
41
|
+
- CLI / output
|
|
42
|
+
- SARIF / integrations
|
|
43
|
+
- Templates
|
|
44
|
+
- Documentation
|
|
45
|
+
- Other
|
|
46
|
+
validations:
|
|
47
|
+
required: true
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Template Contribution
|
|
2
|
+
description: Propose a new dismiss template for a known false positive
|
|
3
|
+
labels: ["template"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Community templates are what make depquiet powerful. Thanks for contributing one!
|
|
9
|
+
|
|
10
|
+
- type: input
|
|
11
|
+
id: template-id
|
|
12
|
+
attributes:
|
|
13
|
+
label: Template ID
|
|
14
|
+
description: A short kebab-case identifier
|
|
15
|
+
placeholder: "prototype-pollution-lodash"
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: cves
|
|
21
|
+
attributes:
|
|
22
|
+
label: CVEs covered
|
|
23
|
+
description: List each CVE on its own line
|
|
24
|
+
placeholder: |
|
|
25
|
+
CVE-2020-8203
|
|
26
|
+
CVE-2019-10744
|
|
27
|
+
validations:
|
|
28
|
+
required: true
|
|
29
|
+
|
|
30
|
+
- type: input
|
|
31
|
+
id: packages
|
|
32
|
+
attributes:
|
|
33
|
+
label: Affected packages
|
|
34
|
+
description: Comma-separated package names
|
|
35
|
+
placeholder: "lodash, lodash.merge"
|
|
36
|
+
validations:
|
|
37
|
+
required: true
|
|
38
|
+
|
|
39
|
+
- type: textarea
|
|
40
|
+
id: reason
|
|
41
|
+
attributes:
|
|
42
|
+
label: Why is this safe to dismiss?
|
|
43
|
+
description: Explain why this CVE is a false positive in most projects. Be specific about the conditions under which it IS exploitable.
|
|
44
|
+
validations:
|
|
45
|
+
required: true
|
|
46
|
+
|
|
47
|
+
- type: textarea
|
|
48
|
+
id: references
|
|
49
|
+
attributes:
|
|
50
|
+
label: References
|
|
51
|
+
description: Links to advisories, blog posts, or discussions that support this template
|
|
52
|
+
validations:
|
|
53
|
+
required: true
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
## What does this PR do?
|
|
2
|
+
|
|
3
|
+
<!-- A brief description of the change -->
|
|
4
|
+
|
|
5
|
+
## Type of change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix
|
|
8
|
+
- [ ] New feature
|
|
9
|
+
- [ ] New template
|
|
10
|
+
- [ ] New parser (package manager support)
|
|
11
|
+
- [ ] Documentation
|
|
12
|
+
- [ ] Refactor (no behavior change)
|
|
13
|
+
|
|
14
|
+
## Checklist
|
|
15
|
+
|
|
16
|
+
- [ ] I've read [CONTRIBUTING.md](../CONTRIBUTING.md)
|
|
17
|
+
- [ ] Tests pass locally (`pytest tests/ -v`)
|
|
18
|
+
- [ ] Linting passes (`ruff check src/ tests/`)
|
|
19
|
+
- [ ] Type checking passes (`mypy src/depquiet/`)
|
|
20
|
+
- [ ] I've added tests for new functionality
|
|
21
|
+
- [ ] I've updated the README if this adds user-facing features
|
|
22
|
+
|
|
23
|
+
## For template contributions
|
|
24
|
+
|
|
25
|
+
- [ ] Every CVE is real and verifiable
|
|
26
|
+
- [ ] The `reason` explains why it's safe to dismiss
|
|
27
|
+
- [ ] File name matches the `id` field
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
name: Lint & Type Check
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.13"
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: pip install -e ".[dev]"
|
|
23
|
+
- name: Ruff check
|
|
24
|
+
run: ruff check src/ tests/
|
|
25
|
+
- name: Ruff format check
|
|
26
|
+
run: ruff format --check src/ tests/
|
|
27
|
+
- name: Mypy
|
|
28
|
+
run: mypy src/depquiet/ --ignore-missing-imports
|
|
29
|
+
|
|
30
|
+
test:
|
|
31
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
needs: lint
|
|
34
|
+
strategy:
|
|
35
|
+
fail-fast: false
|
|
36
|
+
matrix:
|
|
37
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- uses: actions/setup-python@v5
|
|
41
|
+
with:
|
|
42
|
+
python-version: ${{ matrix.python-version }}
|
|
43
|
+
- name: Install dependencies
|
|
44
|
+
run: pip install -e ".[dev]"
|
|
45
|
+
- name: Run tests with coverage
|
|
46
|
+
run: python -m pytest tests/ -v --cov=depquiet --cov-report=xml --cov-report=term-missing
|
|
47
|
+
- name: Upload coverage
|
|
48
|
+
if: matrix.python-version == '3.13'
|
|
49
|
+
uses: codecov/codecov-action@v4
|
|
50
|
+
with:
|
|
51
|
+
file: coverage.xml
|
|
52
|
+
fail_ci_if_error: false
|
|
53
|
+
|
|
54
|
+
build:
|
|
55
|
+
name: Build Package
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
needs: test
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v4
|
|
60
|
+
- uses: actions/setup-python@v5
|
|
61
|
+
with:
|
|
62
|
+
python-version: "3.13"
|
|
63
|
+
- name: Install build tools
|
|
64
|
+
run: pip install build
|
|
65
|
+
- name: Build sdist and wheel
|
|
66
|
+
run: python -m build
|
|
67
|
+
- name: Upload artifacts
|
|
68
|
+
uses: actions/upload-artifact@v4
|
|
69
|
+
with:
|
|
70
|
+
name: dist
|
|
71
|
+
path: dist/
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
name: Build & Publish
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
environment: release
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.13"
|
|
22
|
+
|
|
23
|
+
- name: Install build tools
|
|
24
|
+
run: pip install build
|
|
25
|
+
|
|
26
|
+
- name: Build package
|
|
27
|
+
run: python -m build
|
|
28
|
+
|
|
29
|
+
- name: Publish to PyPI
|
|
30
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
31
|
+
|
|
32
|
+
- name: Create GitHub Release
|
|
33
|
+
uses: softprops/action-gh-release@v2
|
|
34
|
+
with:
|
|
35
|
+
generate_release_notes: true
|
|
36
|
+
files: dist/*
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.eggs/
|
|
8
|
+
*.egg
|
|
9
|
+
.venv/
|
|
10
|
+
venv/
|
|
11
|
+
.env
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.coverage
|
|
14
|
+
coverage.xml
|
|
15
|
+
htmlcov/
|
|
16
|
+
.ruff_cache/
|
|
17
|
+
.mypy_cache/
|
|
18
|
+
*.sarif
|
|
19
|
+
.depquiet-cache/
|
|
20
|
+
benchmarks/results.json
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.3.0] - 2026-11-01
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Grype parser**: triage Anchore Grype output via `grype dir:. -o json | depquiet --stdin` — auto-detects `matches` array, deduplicates CVE+package, maps artifact types to depquiet ecosystems, handles both modern and legacy fix formats
|
|
15
|
+
- **Dependabot parser**: triage GitHub Dependabot alerts via `gh api /repos/OWNER/REPO/dependabot/alerts --paginate | depquiet --stdin` — auto-detects JSON arrays, processes only open alerts, deduplicates CVE+package, handles GHSA-only advisories
|
|
16
|
+
- **Dependabot example** in `examples/dependabot-alerts/` with sample alerts and expected verdicts
|
|
17
|
+
- **Benchmark suite**: reproducible filter-rate measurement across 4 scenarios — **89% noise reduction** proven across npm, pip, trivy, and grype
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **Python reachability analysis**: upgraded from bare string matching to proper `import X` / `from X import Y` / `__import__('X')` detection — prevents false positives from package names appearing in comments or prose
|
|
22
|
+
- **Mixed-project reachability**: `check()` now searches both JS and Python files instead of picking one ecosystem, so mixed-language projects triage correctly
|
|
23
|
+
- trivy.py test coverage raised from 84% to 100%
|
|
24
|
+
- Test suite expanded from 156 to 234 tests
|
|
25
|
+
- Coverage maintained at **100%** across all 19 source files (869/869 statements)
|
|
26
|
+
|
|
27
|
+
## [0.2.0] - 2026-11-01
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **Trivy parser**: auto-detects `trivy fs --format json` output via `--stdin`, processes `lang-pkgs` results (skips OS packages)
|
|
32
|
+
- **`.depquiet.yaml` config file**: commit triage preferences alongside code — `epss_threshold`, `template_dirs`, `always_flag`, `offline`
|
|
33
|
+
- **`--config` CLI flag**: specify a custom config file path instead of the default `.depquiet.yaml` in the project root
|
|
34
|
+
- **`always_flag`**: packages that must never be filtered — forced to ACTION verdict regardless of filters
|
|
35
|
+
- **7 new community templates**: express open redirect, axios SSRF, webpack-dev-middleware, json5 prototype pollution, ip SSRF, requests proxy-auth leak, cryptography null dereference (9 total)
|
|
36
|
+
- **Trivy container example** in `examples/trivy-container/`
|
|
37
|
+
- **Node.js API example** with `.depquiet.yaml` config in `examples/node-api/`
|
|
38
|
+
- **Python web app example** in `examples/python-web/`
|
|
39
|
+
- PEP 561 `py.typed` marker for typed package compliance
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- Full `mypy --strict` compliance across all source files
|
|
44
|
+
- All bare `dict` annotations replaced with `dict[str, Any]`
|
|
45
|
+
- Parser list uses `Protocol` for structural typing
|
|
46
|
+
- Test suite expanded from 29 to 156 tests
|
|
47
|
+
- Coverage raised from 84% to 99%
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- SARIF output bug: `_build_locations` crashed on missing imports field
|
|
52
|
+
- `_parse_yaml_simple` return type narrowed from `dict` to `dict[str, object]` for mypy strict
|
|
53
|
+
|
|
54
|
+
## [0.1.0] - 2026-10-31
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- Core triage engine with four filters: devDependency, reachability, EPSS, and community templates
|
|
59
|
+
- npm audit JSON parser with full advisory support
|
|
60
|
+
- pip-audit JSON parser (stub, expandable)
|
|
61
|
+
- EPSS score integration via FIRST.org API (`--offline` to skip)
|
|
62
|
+
- Import reachability analysis for JavaScript/TypeScript projects
|
|
63
|
+
- Community template system with YAML-based dismiss rules
|
|
64
|
+
- Bundled templates: lodash prototype pollution, semver ReDoS
|
|
65
|
+
- SARIF v2.1.0 output for GitHub Code Scanning integration
|
|
66
|
+
- JSON output mode for programmatic consumption
|
|
67
|
+
- Colored terminal output with before/after noise reduction display
|
|
68
|
+
- CLI with `--sarif`, `--json`, `--offline`, `--stdin`, `--epss-threshold`, `--templates`
|
|
69
|
+
- CI exit code: 1 if ACTION items found, 0 otherwise
|
|
70
|
+
- Full test suite with 29 tests
|
|
71
|
+
- CI workflow with lint, typecheck, test matrix (3.11/3.12/3.13), and build
|
|
72
|
+
- Automated release workflow with trusted PyPI publishing
|
|
73
|
+
|
|
74
|
+
[Unreleased]: https://github.com/samuelrojas-dev/depquiet/compare/v0.3.0...HEAD
|
|
75
|
+
[0.3.0]: https://github.com/samuelrojas-dev/depquiet/compare/v0.2.0...v0.3.0
|
|
76
|
+
[0.2.0]: https://github.com/samuelrojas-dev/depquiet/compare/v0.1.0...v0.2.0
|
|
77
|
+
[0.1.0]: https://github.com/samuelrojas-dev/depquiet/releases/tag/v0.1.0
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
+
overall community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
49
|
+
an individual is officially representing the community in public spaces.
|
|
50
|
+
|
|
51
|
+
## Enforcement
|
|
52
|
+
|
|
53
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
54
|
+
reported to the community leaders responsible for enforcement at
|
|
55
|
+
**sarojas123@icloud.com**.
|
|
56
|
+
|
|
57
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
58
|
+
|
|
59
|
+
## Attribution
|
|
60
|
+
|
|
61
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
62
|
+
version 2.0, available at
|
|
63
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
64
|
+
|
|
65
|
+
[homepage]: https://www.contributor-covenant.org
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Contributing to depquiet
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing! depquiet is an open source tool that helps developers cut through vulnerability alert noise, and contributions from the community are what make it great.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/samuelrojas-dev/depquiet.git
|
|
9
|
+
cd depquiet
|
|
10
|
+
python -m venv .venv && source .venv/bin/activate
|
|
11
|
+
pip install -e ".[dev]"
|
|
12
|
+
python -m pytest tests/ -v
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Ways to Contribute
|
|
16
|
+
|
|
17
|
+
### Community Templates (easiest way to start)
|
|
18
|
+
|
|
19
|
+
The fastest way to contribute is by adding **dismiss templates** — curated rules that help depquiet filter known false positives.
|
|
20
|
+
|
|
21
|
+
Templates live in `templates/dismiss/` and look like this:
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
id: prototype-pollution-lodash
|
|
25
|
+
title: Prototype pollution in lodash (not exploitable in most apps)
|
|
26
|
+
cves:
|
|
27
|
+
- CVE-2020-8203
|
|
28
|
+
- CVE-2019-10744
|
|
29
|
+
packages:
|
|
30
|
+
- lodash
|
|
31
|
+
reason: >
|
|
32
|
+
Prototype pollution in lodash requires attacker-controlled input
|
|
33
|
+
to _.merge, _.defaultsDeep, or _.zipObjectDeep. Most applications
|
|
34
|
+
do not pass untrusted input to these functions.
|
|
35
|
+
references:
|
|
36
|
+
- https://github.com/advisories/GHSA-jf85-cpcp-j695
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Rules for templates:**
|
|
40
|
+
|
|
41
|
+
1. Every CVE must be real and verifiable
|
|
42
|
+
2. The `reason` must explain *why* it's safe to dismiss — not just that it's low severity
|
|
43
|
+
3. One template per logical group (e.g., all lodash prototype pollution CVEs together)
|
|
44
|
+
4. File name matches the `id` field: `{id}.yaml`
|
|
45
|
+
|
|
46
|
+
### Code Contributions
|
|
47
|
+
|
|
48
|
+
1. **Fork and branch**: create a feature branch from `main`
|
|
49
|
+
2. **Write tests first**: every new feature or bugfix needs a test in `tests/`
|
|
50
|
+
3. **Follow the style**: we use `ruff` for linting and `mypy` for type checking
|
|
51
|
+
4. **Keep dependencies at zero**: depquiet has zero runtime dependencies by design. If you need a library, it goes in `[project.optional-dependencies]`
|
|
52
|
+
5. **Run the checks**:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
ruff check src/ tests/
|
|
56
|
+
ruff format --check src/ tests/
|
|
57
|
+
mypy src/depquiet/ --ignore-missing-imports
|
|
58
|
+
python -m pytest tests/ -v --cov=depquiet
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Bug Reports
|
|
62
|
+
|
|
63
|
+
Open an issue with:
|
|
64
|
+
|
|
65
|
+
- Your Python version and OS
|
|
66
|
+
- The command you ran
|
|
67
|
+
- The full error output
|
|
68
|
+
- If possible, the audit JSON that triggered the bug (sanitize any private package names)
|
|
69
|
+
|
|
70
|
+
### Feature Requests
|
|
71
|
+
|
|
72
|
+
Open an issue describing:
|
|
73
|
+
|
|
74
|
+
- The problem you're trying to solve
|
|
75
|
+
- How you imagine the solution working
|
|
76
|
+
- Any alternatives you've considered
|
|
77
|
+
|
|
78
|
+
## Architecture Overview
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
src/depquiet/
|
|
82
|
+
├── cli.py # Entry point, argument parsing
|
|
83
|
+
├── config.py # .depquiet.yaml config file support
|
|
84
|
+
├── engine.py # Core orchestrator — runs parsers + filters
|
|
85
|
+
├── models.py # Dataclasses: Vulnerability, FilterResult
|
|
86
|
+
├── output.py # Terminal output with colors
|
|
87
|
+
├── sarif.py # SARIF v2.1.0 export
|
|
88
|
+
├── parsers/
|
|
89
|
+
│ ├── npm.py # npm audit JSON parser
|
|
90
|
+
│ ├── pip.py # pip-audit JSON parser
|
|
91
|
+
│ ├── trivy.py # Trivy JSON parser (lang-pkgs only)
|
|
92
|
+
│ ├── dependabot.py # GitHub Dependabot alerts parser
|
|
93
|
+
│ └── grype.py # Anchore Grype JSON parser
|
|
94
|
+
└── filters/
|
|
95
|
+
├── devdep.py # devDependency filter
|
|
96
|
+
├── reachability.py # Import reachability analysis
|
|
97
|
+
├── epss.py # EPSS score filter
|
|
98
|
+
└── templates.py # Community template matcher
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Key design principles:**
|
|
102
|
+
|
|
103
|
+
- Parsers convert tool-specific JSON into `Vulnerability` objects
|
|
104
|
+
- Filters take a list of vulnerabilities and return `FilterResult` objects with a reason
|
|
105
|
+
- The engine runs parsers then filters in order
|
|
106
|
+
- Output formatters (terminal, JSON, SARIF) consume `FilterResult` lists
|
|
107
|
+
|
|
108
|
+
## Pull Request Process
|
|
109
|
+
|
|
110
|
+
1. Update tests to cover your changes
|
|
111
|
+
2. Ensure all checks pass (`ruff`, `mypy`, `pytest`)
|
|
112
|
+
3. Update the README if you're adding user-facing features
|
|
113
|
+
4. Fill out the PR template
|
|
114
|
+
5. A maintainer will review within a few days
|
|
115
|
+
|
|
116
|
+
## Code of Conduct
|
|
117
|
+
|
|
118
|
+
This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md). By participating, you agree to uphold a welcoming, inclusive environment.
|
|
119
|
+
|
|
120
|
+
## License
|
|
121
|
+
|
|
122
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
depquiet-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Samuel Rojas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|