sast-eval 0.1.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.
- sast_eval-0.1.0/.github/workflows/publish.yml +75 -0
- sast_eval-0.1.0/.gitignore +22 -0
- sast_eval-0.1.0/EVAL_SPEC.md +780 -0
- sast_eval-0.1.0/Makefile +126 -0
- sast_eval-0.1.0/PKG-INFO +262 -0
- sast_eval-0.1.0/PROVENANCE.md +85 -0
- sast_eval-0.1.0/README.md +240 -0
- sast_eval-0.1.0/docs/ADDING_A_BENCHMARK.md +348 -0
- sast_eval-0.1.0/docs/ARCHITECTURE.md +257 -0
- sast_eval-0.1.0/docs/CYBERGYM_INTEGRATION.md +273 -0
- sast_eval-0.1.0/docs/EXPLOIT_VALIDATION.md +198 -0
- sast_eval-0.1.0/docs/QUICKSTART.md +334 -0
- sast_eval-0.1.0/docs/README.md +57 -0
- sast_eval-0.1.0/docs/RELEASING.md +96 -0
- sast_eval-0.1.0/docs/SASTBENCH_INTEGRATION.md +194 -0
- sast_eval-0.1.0/docs/SCORING.md +256 -0
- sast_eval-0.1.0/pyproject.toml +42 -0
- sast_eval-0.1.0/reports/equivalence_report.md +47 -0
- sast_eval-0.1.0/results/raw/exampletool/bountytasks__InvokeAI__bounty_0.sarif +45 -0
- sast_eval-0.1.0/results/raw/exampletool/cwebench__DSpace__DSpace_CVE-2016-10726_4.4.sarif +45 -0
- sast_eval-0.1.0/results/raw/exampletool/cybergym__arvo:1065.sarif +45 -0
- sast_eval-0.1.0/results/raw/exampletool/owasp__BenchmarkTest00001.sarif +58 -0
- sast_eval-0.1.0/results/raw/exampletool/sastbench__SB-PY-MI-001.sarif +58 -0
- sast_eval-0.1.0/sast_eval/__init__.py +5 -0
- sast_eval-0.1.0/sast_eval/adapters/__init__.py +0 -0
- sast_eval-0.1.0/sast_eval/adapters/common.py +66 -0
- sast_eval-0.1.0/sast_eval/adapters/owasp_adapter.py +129 -0
- sast_eval-0.1.0/sast_eval/adapters/sastbench_adapter.py +231 -0
- sast_eval-0.1.0/sast_eval/cli.py +190 -0
- sast_eval-0.1.0/sast_eval/exploit/__init__.py +5 -0
- sast_eval-0.1.0/sast_eval/exploit/oracle.py +319 -0
- sast_eval-0.1.0/sast_eval/exploit/oracles/__init__.py +15 -0
- sast_eval-0.1.0/sast_eval/exploit/oracles/bountytasks_oracle.py +32 -0
- sast_eval-0.1.0/sast_eval/exploit/oracles/cybergym_oracle.py +33 -0
- sast_eval-0.1.0/sast_eval/importers/FORMATS.md +129 -0
- sast_eval-0.1.0/sast_eval/importers/__init__.py +0 -0
- sast_eval-0.1.0/sast_eval/importers/bountytasks_importer.py +192 -0
- sast_eval-0.1.0/sast_eval/importers/cwebench_importer.py +206 -0
- sast_eval-0.1.0/sast_eval/importers/cybergym_importer.py +160 -0
- sast_eval-0.1.0/sast_eval/matching/__init__.py +0 -0
- sast_eval-0.1.0/sast_eval/matching/cwe_map.json +9 -0
- sast_eval-0.1.0/sast_eval/matching/matcher.py +470 -0
- sast_eval-0.1.0/sast_eval/scoring/__init__.py +0 -0
- sast_eval-0.1.0/sast_eval/scoring/metrics.py +645 -0
- sast_eval-0.1.0/sast_eval/tools/__init__.py +0 -0
- sast_eval-0.1.0/sast_eval/tools/fetch_sources.py +267 -0
- sast_eval-0.1.0/sast_eval/tools/package_codebases.py +221 -0
- sast_eval-0.1.0/tools/exampletool/README.md +82 -0
- sast_eval-0.1.0/tools/exampletool/rules.json +10 -0
- sast_eval-0.1.0/uv.lock +8 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
# Publish to PyPI on a pushed v* tag. Uses Trusted Publishing (OIDC) — no
|
|
4
|
+
# long-lived API token. Only someone with write access to this repo can push
|
|
5
|
+
# a tag, so only they can trigger a release.
|
|
6
|
+
#
|
|
7
|
+
# One-time PyPI setup (do this yourself, it requires your account):
|
|
8
|
+
# 1. Publish the first version manually (twine upload) to create the project,
|
|
9
|
+
# OR reserve the name at https://pypi.org/manage/projects/
|
|
10
|
+
# 2. Add a Trusted Publisher at:
|
|
11
|
+
# https://pypi.org/manage/project/sast-eval/settings/publishing/
|
|
12
|
+
# Owner: <your github username>
|
|
13
|
+
# Repository: sast-eval
|
|
14
|
+
# Workflow: publish.yml
|
|
15
|
+
# Environment: pypi
|
|
16
|
+
# 3. Ensure you are the sole Owner on the project's Collaboration page.
|
|
17
|
+
#
|
|
18
|
+
# See docs/RELEASING.md for the full release checklist.
|
|
19
|
+
|
|
20
|
+
on:
|
|
21
|
+
push:
|
|
22
|
+
tags:
|
|
23
|
+
- 'v*'
|
|
24
|
+
|
|
25
|
+
# Permissions required for Trusted Publishing (OIDC) via pypa/gh-action-pypi-publish.
|
|
26
|
+
permissions:
|
|
27
|
+
id-token: write
|
|
28
|
+
contents: read
|
|
29
|
+
|
|
30
|
+
jobs:
|
|
31
|
+
build:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
|
|
36
|
+
- uses: actions/setup-python@v5
|
|
37
|
+
with:
|
|
38
|
+
python-version: '3.12'
|
|
39
|
+
|
|
40
|
+
- name: Install build tooling
|
|
41
|
+
run: pip install build
|
|
42
|
+
|
|
43
|
+
- name: Build distributions
|
|
44
|
+
run: python -m build
|
|
45
|
+
|
|
46
|
+
- name: Verify metadata
|
|
47
|
+
run: pipx run twine check dist/*
|
|
48
|
+
|
|
49
|
+
- name: Verify wheel installs and imports
|
|
50
|
+
run: |
|
|
51
|
+
python -m venv /tmp/verify
|
|
52
|
+
/tmp/verify/bin/pip install dist/*.whl
|
|
53
|
+
/tmp/verify/bin/python -c "import sast_eval; print('version', sast_eval.__version__)"
|
|
54
|
+
/tmp/verify/bin/python -c "from importlib.resources import files; assert (files('sast_eval.matching')/'cwe_map.json').is_file(); print('cwe_map.json OK')"
|
|
55
|
+
|
|
56
|
+
- name: Upload distributions
|
|
57
|
+
uses: actions/upload-artifact@v4
|
|
58
|
+
with:
|
|
59
|
+
name: dist
|
|
60
|
+
path: dist/
|
|
61
|
+
|
|
62
|
+
publish:
|
|
63
|
+
needs: build
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
# Match the environment name configured on PyPI's Trusted Publisher page.
|
|
66
|
+
environment: pypi
|
|
67
|
+
steps:
|
|
68
|
+
- name: Download distributions
|
|
69
|
+
uses: actions/download-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: dist
|
|
72
|
+
path: dist/
|
|
73
|
+
|
|
74
|
+
- name: Publish to PyPI
|
|
75
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Cloned benchmark repos (symlinked into corpus/ from workspace root; never committed)
|
|
2
|
+
corpus/
|
|
3
|
+
|
|
4
|
+
# Generated task records, imported results, codebases (regenerated by the pipeline)
|
|
5
|
+
tasks/*.jsonl
|
|
6
|
+
imported/*.jsonl
|
|
7
|
+
codebases/
|
|
8
|
+
|
|
9
|
+
# Generated scoring artifacts (regenerated by match/exploit/score)
|
|
10
|
+
# — but keep the hand-crafted exampletool SARIFs (they're docs/examples)
|
|
11
|
+
results/matched/
|
|
12
|
+
results/exploits/
|
|
13
|
+
reports/scorecard.md
|
|
14
|
+
reports/scorecard.html
|
|
15
|
+
|
|
16
|
+
# Python
|
|
17
|
+
__pycache__/
|
|
18
|
+
*.pyc
|
|
19
|
+
.venv/
|
|
20
|
+
|
|
21
|
+
# OS
|
|
22
|
+
.DS_Store
|