agentleFS
cecewu3cecewu3/agent-trading-skills/skills/security-check/SKILL.md

security-check

Skill0 starsChanged 13 days agoMITView on GitHub

Run a weekly (or on-demand) security self-check: API key permissions, secret leakage in logs/repo, anomalous orders, and dependency advisories. Use when the user asks for a security audit of the trading bot, weekly hygiene, or before enabling live trading. Trigger phrases: "security check", "audit keys", "scan for secrets", "weekly safety review", "anomalous orders".

  • Reads credentials

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use learn and code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • genomewalkerSkill

    learn

    Learn from web sources, generate SKILL.md, and store key patterns in soul memory. Trigger keywords: learn, skill-gen, web-learn, documentation, tutorial.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 6 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 22 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before flipping dry_run: false or testnet: false

    line 20
  2. Distinctive:

    After any credential rotation or dependency upgrade

    line 21
  3. Very specific:

    Run each section; record PASS / FAIL / WARN in a report under data/reports/.

    line 25
  4. Distinctive:

    FAIL: if withdraw, transfer, futures, margin, or universal transfer is allowed

    line 31
  5. Distinctive:

    PASS: only for spot trade + read as needed

    line 32
  6. Very specific:

    Ensure config.yaml, .env, and state files are gitignored

    line 37
  7. Very specific:

    Read data/trades.log / positions for the lookback window

    line 43
  8. Very specific:

    If Python: pip audit or uv pip audit when available.

    line 49
  9. Distinctive:

    No post-install scripts from untrusted paths

    line 51
  10. Distinctive:

    Read-only by default; never "fix" by widening key permissions

    line 73
  11. Distinctive:

    Keep reports free of raw secrets (redact mid-string)

    line 74

“Common” is measured: kept by at least 6 in 10 of the 22 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security check

Overview

Operator hygiene checklist implemented as a script and/or agent walkthrough. Schedule hint: schedule.security_check_weekday. Alerts use notifications.on_security_alert.

When to use

  • Weekly cadence
  • Before flipping dry_run: false or testnet: false
  • After any credential rotation or dependency upgrade

Instructions

Run each section; record PASS / FAIL / WARN in a report under data/reports/.

1. Key permissions

  • Load key the same way trade.py does (keychain/env)—do not print it
  • Query venue API key permissions / account flags
  • FAIL if withdraw, transfer, futures, margin, or universal transfer is allowed
  • PASS only for spot trade + read as needed

2. Secret scan (logs + repo)

  • Scan data/, *.log, and tracked source for patterns: API key shapes, secret, PEM blocks, webhook URLs with tokens
  • Ensure config.yaml, .env, and state files are gitignored
  • git grep / rg for accidental credential strings; FAIL on hits
  • Confirm skills and docs contain no live secrets

3. Anomalous orders

  • Read data/trades.log / positions for the lookback window
  • Flag: orders larger than risk.max_buy_quote, symbols outside universe, trades when dry_run should have been on, duplicate client-order bursts, sells exceeding position
  • Compare to exchange trade history if a signed read is available (still spot-only endpoints)

4. Dependency check

  • If Python: pip audit or uv pip audit when available; else note manual review
  • Pin or lockfile present? WARN if not
  • No post-install scripts from untrusted paths

5. Config / stage sanity

  • Live mode requires explicit testnet: false and dry_run: false
  • Required risk fields must not be null
  • Notification secrets only via env keys named in config

Suggested CLI

python security_check.py
python security_check.py --json

Failure handling

  • Any FAIL on permissions or secret leak → notify immediately; refuse further live trades until fixed
  • Audit tool missing → WARN with install hint; do not skip permission check

Guidelines

  • Read-only by default; never "fix" by widening key permissions
  • Keep reports free of raw secrets (redact mid-string)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.