Open-source agent core + payload library for Fimil's autonomous pentest engine.
Project description
fimil-pentest-core
Open-source agent core and payload library for Fimil's autonomous pentest engine.
What this is
This package ships the deployment-config-free subset of the Fimil pentest engine:
- Marker allocation (
fimil_pentest_core.markers) — cryptographic, run-scoped markers for deterministic exploit validation. - Payload library (
fimil_pentest_core.payloads) — a Pydantic-validated YAML schema and ~125 curated payloads across fifteen vectors covering the OWASP Top 10 baseline plus the Aikido-superset Phase 5 vectors:- OWASP Top 10 baseline (v0.1.x): XSS, SQLi, SSRF, IDOR, authz, mass-assignment, prompt-injection (chat + structured)
- Phase 5 superset (v0.3.0): SSTI (Jinja2 / Twig / Freemarker / Velocity / ERB), LDAP injection, XPath injection, XXE, command injection, path traversal, JWT attacks, insecure deserialization
- SSTI engine fingerprint table (
fimil_pentest_core.payloads.ssti.engines.yaml) — per-engine differential probes for the validator's engine-detection layer. Source-of-truth for the §13 decision 14 spec commitment.
The host application — Fimil-dev/fimil — provides everything else: the LLM agent loop, the deterministic validator, the scope guard (DNS pinning + IP allowlist + kill-switch), the redaction layer, and the persistence repositories.
Install
pip install fimil-pentest-core
Quickstart
import uuid
from fimil_pentest_core import markers, load_all_payloads
# 1) Allocate a fresh marker for a run.
run_id = uuid.uuid4()
policy_snapshot = {"oob_base_url": "https://oob.example.com"}
marker, oob_url = markers.allocate(run_id, policy_snapshot)
# marker == "<8-hex-prefix>.<128-bit-hex>"
# oob_url == "https://oob.example.com/<marker>"
# 2) Load the curated payload library.
all_payloads = load_all_payloads()
# {'xss': [...], 'sqli': [...], 'ssrf': [...], ...}
xss_payloads = all_payloads["xss"]
for entry in xss_payloads:
print(entry.id, entry.template, entry.severity)
Schema
Each payload YAML is validated by PayloadEntry:
vector: xss
id: script-tag-injection
template: "<script>alert({{marker}})</script>"
applies_to:
methods: [GET, POST]
param_hints: [q, search, query, message]
expected_signal: xss_executable
severity: high
references: [CWE-79, OWASP-A03]
Five model validators enforce hard constraints at load time:
- SSRF baked-URL guard — any SSRF template containing
http://,file://,gopher://, or a numeric IPv4 literal fails to load. Only{{oob_url}}substitution is permitted. - XXE / insecure_deserialization OOB-only guard — mirrors the SSRF rule. Well-known XML namespace URIs (W3C, SOAP, OOXML, OASIS, OpenGIS) are scrubbed before scanning so they don't trip the no-baked-URL guard.
- Command-injection metacharacter whitelist — payload templates may contain only the curated set
;|&`$()plus alphanumerics / spaces /._/-\. Baked-in IPs and URL schemes outside{{oob_url}}are rejected. - SSTI engine field requirement —
vector: sstipayloads must declare which engine they target. - Boolean-differential pair requirement —
expected_signalending in_boolean_diff(SQLi, LDAP, XPath) requires a pairednegative_templateso the validator can run the differential.
Vector taxonomy
| Vector | OWASP | CWE | Validator type |
|---|---|---|---|
xss |
A03:2021 | CWE-79 | Parse-tree executable-context match |
sqli |
A03:2021 | CWE-89 | Boolean / time-based differential |
ssrf |
A10:2021 | CWE-918 | OOB callback within window |
idor |
A01:2021 | CWE-639 | Cross-account session three-signal |
authz |
A01:2021 | CWE-285 | Cross-account PII differential |
mass_assignment |
A08:2021 | CWE-915 | Read-back persistence |
prompt_injection |
LLM01 | CWE-1427 | Chat refusal differential / structured schema violation |
ssti |
A03:2021 | CWE-1336 | Per-engine differential math-eval (5 engines) |
ldap |
A03:2021 | CWE-90 | Boolean differential row-count |
xpath |
A03:2021 | CWE-643 | Boolean differential row-count |
xxe |
A05:2021 | CWE-611 | OOB callback within window |
command_injection |
A03:2021 | CWE-78 | OOB callback / time-delta |
path_traversal |
A01:2021 | CWE-22 | File-content fingerprint regex |
jwt |
A02:2021 | CWE-347 | alg-none / weak-HMAC / kid-injection |
insecure_deserialization |
A08:2021 | CWE-502 | OOB callback within window |
License
Apache 2.0. See LICENSE.
Contributing
This is the open-source core; the host application is closed-source. Issues and PRs welcome for:
- New payloads (must include CWE/OWASP references and pass SSRF / SQLi schema constraints)
- Additional vectors (coordinate with
Fimil-dev/fimilmaintainers — host validators must land in lockstep) - Schema improvements (PR with regression test)
Roadmap
- v0.1.x — payload library + markers
- v0.2.0 — extract
agent_loop+validatorfromFimil-dev/fimil(pending the AIP-4.4 PyPI cut-over perdocs/operations/os-extraction-runbook.md §2.5in the host repo) - v0.3.0 — Phase 5 vector expansion: SSTI (5 engines), LDAP, XPath, XXE, command injection, path traversal, JWT, insecure deserialization (this release)
- v0.4.0+ — browser-driven testing primitives (Playwright tool wrapper)
See CHANGELOG.md for per-release detail and Fimil-dev/fimil issue tracker for upstream coordination.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fimil_pentest_core-0.3.0.tar.gz.
File metadata
- Download URL: fimil_pentest_core-0.3.0.tar.gz
- Upload date:
- Size: 41.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5774341bbab41ce4094af25a197436d362af6fc2f3a450d7fd4699bd09bf353
|
|
| MD5 |
f26607aa499a9598befcc14390b8dd36
|
|
| BLAKE2b-256 |
09baa73a4ea7fe6d31d5605650c30784cc4cfaa599999fd32cbd2c7723155584
|
Provenance
The following attestation bundles were made for fimil_pentest_core-0.3.0.tar.gz:
Publisher:
release.yml on Fimil-dev/fimil-pentest-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fimil_pentest_core-0.3.0.tar.gz -
Subject digest:
f5774341bbab41ce4094af25a197436d362af6fc2f3a450d7fd4699bd09bf353 - Sigstore transparency entry: 1438958869
- Sigstore integration time:
-
Permalink:
Fimil-dev/fimil-pentest-core@30ba26cd6b8f89f8ab566e2252d7f4313e55159b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Fimil-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@30ba26cd6b8f89f8ab566e2252d7f4313e55159b -
Trigger Event:
push
-
Statement type:
File details
Details for the file fimil_pentest_core-0.3.0-py3-none-any.whl.
File metadata
- Download URL: fimil_pentest_core-0.3.0-py3-none-any.whl
- Upload date:
- Size: 95.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
562efbb010f6cfc6c6f8e94753093463d8d599797b26ddf0bd5dc37ed06ed4a4
|
|
| MD5 |
5e9b3dfde6501d168e488f9def6e71a6
|
|
| BLAKE2b-256 |
c7d666ca131d50c0ebaf30c5c7f6b3d59d220c1ed749a83cc4358ddfc1a688e2
|
Provenance
The following attestation bundles were made for fimil_pentest_core-0.3.0-py3-none-any.whl:
Publisher:
release.yml on Fimil-dev/fimil-pentest-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fimil_pentest_core-0.3.0-py3-none-any.whl -
Subject digest:
562efbb010f6cfc6c6f8e94753093463d8d599797b26ddf0bd5dc37ed06ed4a4 - Sigstore transparency entry: 1438958891
- Sigstore integration time:
-
Permalink:
Fimil-dev/fimil-pentest-core@30ba26cd6b8f89f8ab566e2252d7f4313e55159b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Fimil-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@30ba26cd6b8f89f8ab566e2252d7f4313e55159b -
Trigger Event:
push
-
Statement type: