AI INTEGRATION SPECIALISTS
[Open-Source · Security]

MAL-MON

An agent-agnostic malware & supply-chain scanner for CI/CD — pure bash + python3 stdlib, zero install. It catches malicious code, leaked secrets and poisoned dependencies before they merge, then gates the build through its exit code. Built in the open by OptinAmpOut.

0Dependencies
6Threat classes
3Output formats
SARIFCode-scanning ready
Why we built it

The dangerous code is the code you didn’t write

A single curl … | bash in a postinstall hook, a base64 blob that decodes to a reverse shell, an AWS key committed by accident — supply-chain and malware incidents almost always slip in through code nobody reviewed line-by-line. mal-mon runs that review automatically, on every push, and fails the build when it finds something. The core needs nothing but bash and python3, so it runs anywhere — CI runner, pre-commit hook, or an agent’s sandbox.

How it works

One entrypoint, one gate

scan.sh always runs the dependency-free engine, layers in any richer scanners it finds on the runner, then merges, de-duplicates and ranks — gating the build through its exit code.

01 · SCAN

Built-in engine

heuristics.py runs always — pattern rules, entropy analysis and base64 payload decoding, no install required.

02 · AUGMENT

Auto-detect tools

If gitleaks, semgrep, trivy, pip-audit or npm are present, they’re merged in — otherwise gracefully skipped.

03 · RANK

Merge & severity-rank

Findings are de-duplicated and ranked LOWCRITICAL, then rendered as text, JSON or SARIF.

04 · GATE

Exit-code gate

0 clean · 1 findings at/above threshold · 2 error. The pipeline stops on what matters.

What it detects

Six classes of trouble

From obvious reverse shells to high-entropy secrets and poisoned install hooks.

Malicious code

Pipe-to-shell (curl … | bash), /dev/tcp reverse shells, nc -e, crypto miners.

Obfuscation

eval(base64…), Function(atob(…)), hex/charCode blobs, base64 that decodes to executable content.

Unsafe deserialization

pickle.loads, marshal.loads, yaml.load without SafeLoader, node vm.

Secrets

Private keys, AWS / GitHub / Slack / Google / Stripe tokens, JWTs, hardcoded creds and high-entropy strings.

Supply-chain

npm pre/postinstall hooks running network/eval; dependency CVEs via trivy / pip-audit / npm-audit.

Exfiltration

Reading ~/.ssh, cloud creds, or env vars posted to the network.

Drop it in

Self-contained — copy two files

scan.sh + heuristics.py are all you need. Run it in CI, as a pre-commit hook, or point an agent at it as the /malware-monitor skill.

bash
# Full scan, fail the build on HIGH or above
./scan.sh --path . --fail-on HIGH

# Pre-commit: only scan staged files
./scan.sh --staged --fail-on MEDIUM

# Machine-readable for GitHub code-scanning
./scan.sh --path . --format sarif --output scan.sarif
.github/workflows/security.yml
- name: malware-monitor
  run: |
    bash .ci/malware-monitor/scan.sh --path . --fail-on HIGH \
         --format sarif --output results.sarif
- uses: github/codeql-action/upload-sarif@v3
  if: always()
  with: { sarif_file: results.sarif }
FlagDefaultMeaning
--path DIR.Directory or file to scan.
--stagedoffScan only git-staged files (pre-commit).
--fail-on SEVHIGHMin severity that fails the build.
--formattexttext · json · sarif.
--secrets-onlyoffRun only secret rules — a fast gate.
--no-optionaloffSkip external scanners; built-in engine only.
We build in the open

Defensive by design

mal-mon detects and reports — it never executes flagged payloads and never “fixes” or augments malicious code. Scan code you own or are authorized to audit. It’s part of the secure-operations toolchain we run on our own pipelines and our clients’.

mal-mon

Agent-agnostic CI/CD scanner for malware, secrets and supply-chain risk — zero install, exit-code gating.

git.churchofmalware.org/Trilltechnician/mal-mon
Open Source bash + python3 stdlib text · json · sarif Defensive only
Browse the repo ↗

Want this guarding your pipeline?

We wire malware, secret and supply-chain scanning into CI/CD — and harden the rest of your build path while we’re there. Tell us what you’re shipping.

Book a build call →