This release is a pre-release and may not be stable for production use.
Mallace
Mallace finds serious security bugs in your GitHub repositories, proves each one with a regression test that fails on your current code, fixes it, has an independent model review the fix, and opens one pull request per verified fix. Nothing merges automatically. Scanning is free. Website: https://mallace.codefrontlabs.com.
Current release: 0.1.0a36 on PyPI and in the
GitHub Action (JRH89/mallace-action@v0).
Mallace is alpha software.
What it finds
Proved and fixed with pull requests (24 rules across Python, JavaScript/TypeScript, PHP, Ruby and Go, including Django, Flask, FastAPI, Express, Next.js, Laravel, WordPress and Rails):
- SQL injection
- Command injection
- Code injection (
eval, plusexecin Python andinstance_eval/class_evalin Ruby) - Template injection (Go templates parsed from caller input)
- Cross-site scripting: request data sent back as HTML unescaped (Python and JavaScript/TypeScript)
- Server-side request forgery: the server fetching a URL taken from the request (Python and JavaScript/TypeScript)
- Unsafe deserialization (
yaml.load,pickle, PHPunserialize, RubyMarshal.loadand unsafe YAML)
Java is scanned for SQL injection, command injection and unsafe deserialization; Java findings are reported but not fixed yet.
Reported on every scan, without fixing:
- Leaked secrets: API keys and private keys committed to the repository (the key is never printed)
- Vulnerable dependencies: exact versions in
requirements*.txt,package-lock.json,composer.lockandGemfile.lock, checked against the public OSV database
mallace attack starts your web app from the pushed code in a Docker sandbox with no network, attacks
that copy over HTTP, and reports only attacks a planted canary proved: SQL, command, code and template
injection, file reads outside the app, and cross-site scripting. It never touches a deployed site. With
--fix it hands the proved findings (SQL, command, code and template injection, file reads, and
reflected and stored cross-site scripting) to mallace fix, which writes a regression test from the
proving request and opens a pull request for each verified fix, up to 5 per run (--no-pr keeps them
local). Apps that need a database server or other service to start can't run in
the sandbox yet.
Separately, mallace site runs a read-only security check on a live website you have
proved you own with a DNS record, file or meta tag. It looks; it doesn't attack.
How a run works
- Scan: a pinned, offline Semgrep ruleset runs on your runner and lists suspected bugs.
- Prove: a model writes a regression test, run in a sandbox with no network. It must fail on your current code, or Mallace leaves the code alone.
- Fix: a model writes the smallest fix. The same test must pass and the code must compile.
- Review: a second, independent model reviews the change. A rejected fix goes back with the reviewer's feedback.
- Deliver: one issue and one pull request per verified fix, with the test that proved it.
Scanning and tests run on your runner. To write a test, fix or review, only the code around that finding is sent to the Mallace service, which passes it to the model for that call and does not store it.
Use it
Three ways, all using the same license key:
-
The app: sign in with GitHub at https://mallace.codefrontlabs.com/app.
-
The GitHub Action: add
JRH89/mallace-action@v0to a workflow:permissions: contents: write issues: write pull-requests: write jobs: mallace: runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v4 - uses: JRH89/mallace-action@v0 with: license-key: ${{ secrets.MALLACE_LICENSE }} budget: '2' # most the AI may spend per run, in dollars
-
The CLI (Python 3.12 or later; Docker for the test sandbox):
pipx install --pip-args=--pre mallace # or: pip install --pre mallace mallace doctor # checks Docker, your license and GitHub login mallace fix --scan-only # free: list suspected bugs mallace activate # paste your license key once mallace fix --budget 5 # prove, fix and open PRs
Website check:
mallace site verify example.com # shows how to prove you own it, then confirms the proof mallace site check example.com # read-only check with a plain-English report
Full documentation: https://mallace.codefrontlabs.com/docs.
CLI commands
| Command | Purpose |
|---|---|
fix |
Find, prove, fix and open PRs for this repository (--scan-only for a free scan) |
doctor |
Check this machine and repository are ready for mallace fix |
activate, license |
Store, inspect or remove the license key used for fixes |
config |
Saved defaults for mallace fix |
site |
Read-only checks of a website you own |
login, connection |
Personal identity, runner enrollment and owner-requested runner jobs |
assess, targets, runner |
Scoped offline assessment and local runner commands (advanced) |
remediate |
Policy-controlled remediation pipeline (advanced) |
campaign, serve, secrets |
AI red-team campaigns, the local API and runner secrets (advanced) |
License
Releases from 0.1.0a27 are licensed under the Business Source License 1.1,
with an additional use grant to scan code and to generate fixes with a Mallace license
key. The Change Date is 2030-11-08, when it converts to Apache 2.0, as stated in LICENSE. Earlier releases and inherited
prototype code are under the MIT License.
Development
Mallace evolved from the AI-Product-Red-Team-Agent prototype. The installed
find-and-fix, website and hosted identity/enrollment paths have passed live acceptance;
the shipped API container and sample environment select simulation for AI campaigns.
See live versus simulation and
Project Status for tested boundaries and evidence.
Claude owns frontend work, including the website under site/; backend work owns the
APIs, the bundled operator workspace APIs and package delivery.
For development from a trusted checkout, the validated environment is Linux with Python 3.15.2. Compatibility evidence is recorded in the release documentation.
python3.15 -m venv .venv
.venv/bin/python -m pip install -r requirements-dev.lock.txt
scripts/check-local.sh
requirements.lock.txt contains exact runtime versions;
requirements-dev.lock.txt adds pytest and test-only dependencies. These are
version snapshots, not hash-verified supply-chain locks. Node.js is required
for the operator JavaScript checks. Set MALLACE_PYTHON to check another
Python environment. The combined check runs pip consistency, Python tests,
operator syntax, and deterministic operator request-race tests.
A second clean environment installed the snapshots and passed the then-current 94 tests. Later verification and remaining warnings are recorded in Project Status and the delivery ledger.
Explore a simulation
.venv/bin/python main.py --mock
This simulates the provider and target. It does not assess any real product.
Reports are generated as JSON, HTML and SARIF under reports/. Mock mode is
explicit in exports. Generated audit logs and databases can contain sensitive
evidence; review them before sharing. Mock integration tests use temporary
output directories and fake network boundaries.
Supported CLI flags are --mock, --serve, --host, --port,
--target-name, and --target-endpoint. There is no --resume command.
CLI campaigns now use the same lifecycle/case ledger and exclusive ownership
lock. Stop the API using that ledger before launching a standalone CLI campaign.
Local API and operator workspace
Runner settings come from process environment variables by default. To use a trusted dotenv file, select it explicitly with an absolute path, for example MALLACE_ENV_FILE=/secure/mallace.env python main.py --serve. Keep it outside assessed source. A working-directory .env is not loaded automatically.
Set API_ACCESS_KEY to an operator-chosen secret through the process environment or an explicitly selected runner configuration,
then start the local simulated API:
.venv/bin/python main.py --serve --mock
The default bind address is 127.0.0.1:8000. Open /operator for the initial
workspace or /docs for the interactive API reference. Campaign data routes
require Authorization: Bearer <operator-key>. An empty configured key disables
campaign access with HTTP 503; invalid credentials receive HTTP 401.
The workspace can launch mock-only simulations, request cancellation, list actual persisted campaigns, inspect report snapshots, and record review decisions. Live launch remains an advanced API workflow. The simulation form pins expected_mode to mock. It holds the access key only in page memory and clears it on disconnect/reload. Its browser visual verification is outstanding because the browser host was unavailable; HTTP, syntax, and deterministic race checks have been exercised.
Campaign API
POST /campaigns: persist a campaign and return HTTP 202 promptly with its campaign ID and queued status. Poll the status route for execution results. Request body containstargetand an enumeratedscope. Internal campaign tokens are not returned.GET /campaigns?limit=25&offset=0: bounded campaign listing.GET /campaigns/{id}: durable lifecycle status, mode, error code and case counts.GET /campaigns/{id}/cases?limit=25&offset=0: safe journal metadata; no raw bodies or request fingerprints. Pending delivery remains indeterminate.GET /campaigns/{id}/report: protected persisted report snapshot.POST /campaigns/{id}/cancel: cooperative cancellation. It stops future node/case work; it cannot undo an in-flight request.POST /campaigns/{id}/review: recordacknowledgedorrejectedwith a non-empty rationale. This assesses evidence, not remediation, and never resumes requests. One shared operator identity is recorded for this prototype.GET /campaigns/{id}/review: persisted review decision.GET /health: unauthenticated basic health and execution mode.
For retry-safe launches, supply Idempotency-Key (1–128 characters). The same
key and request/configuration return the original campaign rather than execute
again. Changed requests return HTTP 409. Omitting the key creates a new campaign.
Keys and records persist in CAMPAIGN_LEDGER_PATH (default campaigns.db).
Run one API process per ledger on Linux. A file lock prevents a second owner.
On startup, unfinished running/cancelling records become interrupted, never
silently restarted. Unstarted queued jobs survive restarts and execute only if
the configuration fingerprint still matches; changed configuration produces
failed status with configuration_changed. Pending case attempts require reconciliation: target-side
side effects may have happened even if no response was recorded. The case
journal is not durable graph recovery or a guarantee of exactly-once delivery.
Live execution boundaries
Live testing requires explicit target-owner authorization and defined scope. No endpoint is approved by default. The operator must configure:
APPROVED_TARGET_ENDPOINTS: JSON list of exact approved endpoint strings.TARGET_APPROVAL_EXPIRIES: JSON mapping from each endpoint to a future, timezone-aware expiry timestamp.TARGET_NETWORKS: JSON mapping from exact endpoints to explicitly approved CIDR lists. Every resolved address must be permitted; connections pin a literal IP while preserving the original Host/TLS identity. Invalid CIDRs fail startup.- Appropriate provider credentials and models, independently of target approval.
MAX_CAMPAIGN_REQUESTS(default 1000) andEXECUTION_RATE_LIMIT_MS(default 500), according to the authorized scope and traffic budget.
Approval is checked at API intake and before each target request. Target
requests do not follow redirects, inherit environment proxies, or forward
internal campaign tokens. Transport/HTTP failures become failed UNKNOWN cases;
failed/skipped cases are not judged or ranked as vulnerabilities. Invalid live
judge or generator output fails explicitly. Expired or ambiguous grants deny
execution. These controls do not establish target ownership or production security. Target bearer credentials may be configured through the operator-only
TARGET_AUTH_TOKENS JSON mapping from exact endpoint to token. They are kept
separate from campaign authorization; secret-manager integration is unfinished.
Current limits
The operator key is not multi-user identity or tenant isolation. Distributed scheduling, safe graph resume, complete per-case recovery, a reviewed live evaluation benchmark, independently validated drift methodology, general secret detection, retention/off-host restore drills and production monitoring remain unfinished. Reports are evidence for review, not security certifications. Autonomous remediation is being implemented in Mallace using ForgeLoop principles; ForgeLoop itself remains unchanged. Customer acceptance and the remaining release gates are still open.
Read the roadmap,
and Product Status for implementation evidence
and open gates. The historical prototype README is archived under
docs/reference/Prototype-README-history.md; its capability claims are historical,
not current operator instructions.
Local workers are bounded by MAX_CONCURRENT_CAMPAIGNS (default one); the
waiting queue is bounded by MAX_QUEUED_CAMPAIGNS (default 20). A full queue
returns HTTP 429 before creating a campaign. Existing-key retries return their
original record. Queued cancellation stops the job before execution. Shutdown
marks active jobs interrupted and waits for workers before releasing ownership.
Provider calls have PROVIDER_TIMEOUT_SECONDS (default 60), no SDK retries,
and AutoGen has an overall EXPLORATION_TIMEOUT_SECONDS (default 120).
See local operations for cancellation,
snapshots, restoration and local container instructions.
Drift comparisons require observed baseline classifications, unique matched case IDs, identical prompts, matching mode/configuration and sufficient reviewed observations. Legacy desired refusal labels cannot establish drift. Review flags/context supplied by the caller are metadata, not independently verified provenance; see drift evidence.
The private product repository is JRH89/mallace;
Vercel builds the website in site/ from main. See deployment setup.
Autonomous assessment/remediation is now an active workstream. The first customer runner slice provides trusted policy validation, durable issue delivery, isolated patch/review/retest and verified PR delivery with opt-in merge. A real bounded scanner/model repair test opened a verified private fixture PR; see live acceptance evidence. Customer infrastructure, opt-in merge and operational release gates remain open.
For scoped offline secret-pattern assessment of committed source, see Offline Assessment. This executes locally and reports unverified observations with explicit coverage.
An opt-in sandboxed Gitleaks adapter adds the pinned tool’s built-in secret rules with explicit scope, release verification and container isolation.
Independent confirmation connects a live observation to a trusted exact-finding probe before remediation eligibility.
Offline code assessment runs Mallace's pinned Semgrep rules with complete reported target accounting and unverified findings.
Offline Dockerfile assessment adds pinned no-network Trivy checks with exact target accounting and source suppression rejection. Local runner secrets explains desktop keyring storage and private credential loading.
Offline Kubernetes manifest assessment checks committed Pod/Deployment YAML with no cluster access, explicit grants and exact file accounting. Real cloud configuration scanning is being added with explicit account/bucket grants and disposable live acceptance.
Offline dependency advisory assessment checks declared exact Python pins against a trusted hash-pinned database without installs or customer inventory uploads. Explicit prepare-db handles supplier data separately from network-disabled scans.
Real AWS S3 configuration assessment reads explicitly scoped bucket configuration without object access or writes; account setup and actual bucket acceptance are tracked separately.
Cloud-to-source repair maps fresh scoped S3 observations to explicitly authorized CloudFormation JSON and runs independent source confirmation plus the real issue/patch/review/retest/PR pipeline. Actual private cloud-source PR acceptance passed; PRs do not deploy cloud changes.
Standalone local runner adds explicit foreground assessment execution, durable local submissions, inspection and cancellation. Hosted identity and enrollment and outbound runner jobs connect a local runner to the hosted service.
Metadata
Release files for mallace 0.1.0a36
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mallace-0.1.0a36-py3-none-any.whl | Python 3 | none | any | Details for mallace-0.1.0a36-py3-none-any.whl |
Release files / mallace-0.1.0a36-py3-none-any.whl
| Download URL | mallace-0.1.0a36-py3-none-any.whl |
|---|---|
| Size | 350.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64b326252940406671908ffe4e51019e3a89e27ec01d7b9b8aad5474ec287f00
|
|
BLAKE2b-256 checksum How to use checksums |
3d7397efa5b7ed39cbe81409c32c264dcbb73a54625c555171695a9aaad26c27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for mallace 0.1.0a36
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for mallace-0.1.0a36-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.