Security · open-source skills

Updated · MIT licensed

AI made cracking cheap.
A server that takes money has to be defended all the way down.

During my years in cloud security at Alibaba Cloud I handled 200 trojan intrusions and advanced attacks such as commands pushed through the cloud assistant. That second kind never touches your SSH: with one leaked cloud AccessKey, the attacker sends a single command from the console and every server gets a backdoor in the same minute.

Attacks are getting cheaper. Taking apart an app, an obfuscated front end or a mini-program used to cost a skilled reverse engineer days; now you paste the code into an AI and the signing algorithm, the endpoints and the key you thought was hidden are often on screen within minutes. Scanners use AI too: they rotate identities, guess paths and read your error messages before the next try.

So the rule has changed: there are no secrets on the client; only checks on the server count. Obfuscation buys a few minutes. What actually stops an attacker is a server that recalculates every amount, verifies every payment notification with the gateway and reconciles every balance change, plus a cloud account that holds even when a key leaks.

I turned that experience into 6 Claude Code skills. Install them and let the AI look at your servers, cloud account and payment flow the way an attacker would. Use AI to defend against AI.

Our server, last 24 hours 36,758requests 911 looking for keys / config files 94 IPs banned now Live data ›
Get it on GitHub or download the zip

Install and go

Copy three commands, then tell Claude Code what you want.

git clone https://github.com/roisantoso-id/lock-every-bit.git
mkdir -p ~/.claude/skills
cp -r lock-every-bit/skills/sec-* ~/.claude/skills/

Not a paper checklist: our production runs on it every day

Live security dashboard; public page, IPs masked.

Live security dashboard: 24h requests, blocks, key probes, bans, attack-origin map and attack types

Four rules for defending in the age of AI reverse engineering

  1. No secrets on the clientTreat every signing algorithm, endpoint and key in your web app, mobile app or mini-program as already read. No key that can move money lives on the client.
  2. Only the server decides amountsRecalculate price, quantity, discount and credit on the server; after verifying a payment notification, confirm it with the gateway; credit with an atomic update, once.
  3. Your cloud account matters more than SSHThe console, AccessKeys and the cloud assistant each equal root on every machine. Turn on MFA for the root account, deny remote-command actions on every key and alert on them in the audit log.
  4. Use AI to defend against AIEvery morning let an AI review yesterday's changes as an attacker would, and keep a reconciliation alert as the last net: balances only grow from recorded top-ups.

What's inside

Two core skills: server hardening keeps attackers out; payment security keeps the money safe even if they get in. The other four support them.

01
sec-server Server hardening Core Keep them out
  • Your cloud account matters more than SSH: one leaked AccessKey can push commands to every machine through the cloud assistant, bypassing SSH
  • Key-only SSH, no root login; Docker-published ports skip ufw, so your "internal only" rule may not be working at all
  • Auto-updates installed is not auto-updates working: some cloud images comment out the security source

Ships with: server-audit.sh read-only audit

02
sec-payment Payment security Core Even if they get in, the money stays
  • In the age of AI reverse engineering there are no secrets on the client: the server recalculates price, quantity and credit
  • Verify every payment notification, then confirm it with the gateway; credit each payment once, with a unique ledger reference as the backstop
  • Balances only grow from recorded top-ups: reconcile every 15 minutes and alert on anything without a source

Ships with: PHP / Node webhook verification + idempotent credit code

03
sec-edge Bots and scanners The earlier you drop a bad request, the cheaper it is
  • The origin only accepts connections from the CDN; forged client-IP headers get nowhere
  • Paths like .env, .git and wp-login are dropped before they reach your app
  • Cap concurrent dynamic requests per IP, so dozens of parallel requests cannot fill your worker pool

Ships with: nginx / fail2ban templates, exposure-check.sh external check

04
sec-secrets Secrets and encryption Seen once means leaked
  • Keys never go into git history, logs, URL parameters, front-end code, screenshots or AI chats
  • Highly sensitive data: ciphertext bound to its record, two keys kept apart
  • Backups encrypted with a public key: even a breached server cannot open old backups

Ships with: secret-scan.sh scans the whole git history

05
sec-watch Monitoring and recovery Know within minutes
  • Alert on every SSH login: if it was not you, something is wrong
  • A dead server cannot send its own alert: add external checks from two regions
  • A backup you never restored is not a backup: decrypt, import and compare row counts every quarter

Ships with: ssh-login-alert.sh、backup-encrypt.sh

06
sec-audit AI security audit Two models review, a third finds the holes
  • Two different models review the same files independently, then a third argues against each finding
  • Review yesterday's changes every day, plus one high-risk module in rotation
  • Comes with 24 real bug classes we found, as a checklist

Ships with: Audit report template

Got one afternoon? Do these 5 things first

In order; each one stands on its own.

  1. Turn off password and root login for SSHCheck the effective values with sudo sshd -T | grep -Ei 'passwordauth|permitroot'; both must be no.
  2. See which ports are open to the internetRun ss -tlnp and docker ps. Bind databases and Redis to the private network only; leave just 22, 80 and 443 public.
  3. Make sure security updates actually installIn /etc/apt/apt.conf.d/50unattended-upgrades, the -security line must not start with //.
  4. Add a gateway check and atomic crediting to your payment webhookAfter verifying the signature, query the gateway with the order number; credit with UPDATE … WHERE status = 'pending' and only add money when exactly one row changed.
  5. Turn on SSH login alerts, then make an encrypted backup and restore itThese two decide how fast you find out and whether you can recover.

Bugs we found in our own code (excerpt)

All found on live sites and all fixed now. Your code probably has a few of these too.

Sign-up bonus claimed again and againA new IPv6 address or an extra dot in a Gmail address counted as a new user; check-then-write let 10 parallel requests claim 10 bonuses.
Credential-stuffing counter could be resetAny successful login cleared the failures for that IP: try a few passwords, log into your own account, repeat forever without a lockout.
Concurrency pushed balances below zeroNo pre-authorisation, so a nearly empty account fired many requests at once.
The forwarded request was not the billed requestQuantity was capped only when pricing; the upstream still received the raw value from the user.
Staff could take over customer accountsAnyone with "edit customer" rights could reset passwords, turn off 2FA and spend the customer's balance.
Reverse proxy could reach internal endpoints.., %2e and %2f in the path escaped the allowed prefix.
Keys ended up in logsSome APIs put the key in a URL parameter, so it landed in plain text in nginx logs and an external log platform.
Unknown SSH keysKeys attached in the cloud console came back after every reinstall.

All 24 classes and their fixes are in sec-audit.

Before you use it

Author

Santoso, Jakarta. Cloud computing and systems architecture.

Career history is personal; the organisations listed have no partnership with or endorsement of this project.

FAQ

Is it free? Can I use it commercially?

Free, under the MIT licence. Modify it, use it commercially or put it in your team's repo; just keep the licence notice.

Does it only work with Claude Code?

Each skill is a folder with a SKILL.md that Claude Code reads directly; other AI coding tools that read Markdown instructions work too. The scripts and nginx / fail2ban templates need no AI at all.

What language are the skills written in?

The SKILL.md files are in Chinese, which Claude reads without trouble; scripts, templates and code samples are language-neutral. The GitHub README comes in Chinese, English, Indonesian and Japanese.

Will the scripts change my server?

No. server-audit.sh, exposure-check.sh and secret-scan.sh are read-only and only print OK / WARN / FAIL. You decide what to change; each SKILL.md explains every step and how to roll it back.

Why publish security practices?

These are general practices against automated scanning and common bugs; knowing them does not help an attacker get around them. What must stay private are your tuned thresholds, server addresses and unfixed issues, and none of those are in here.

Can I use it to scan other people's sites?

No. Use it only on servers and sites you own. Scanning other people's sites is illegal in many countries.

If it helps, star the repo and pass it to a friend who builds alone. Found a mistake or a better way? Open an issue on GitHub.

Go to GitHub