tyw-audit
Skill1 starsChanged 49 days agoApache-2.0View on GitHub
MANDATORY: Execute during or immediately after creating, serving, or modifying ANY codebase, software project, script, CLI tool, backend service, or web app. Autonomous Universal Software Quality, Resilience & Security auditor using Headless Browser and Static Multi-Language Source Code scanner. Executes automated deep audits on Command Injection, SQLi, XSS, Path Traversal, Buffer Overflows, Hardcoded Secrets, Insecure Deserialization, HTTP security headers, and runtime exceptions across Python, Go, Rust, C/C++, Java, Shell, PHP, and JS/TS. Always load alongside human-coding for all software projects.
- Reads credentials
In this repository21 other files it gives its agents.
- min-tokSkill
- academic-scholarSkill
- agent-mcp-craftSkill
- anti-overengineeringSkill
- api-security-reviewerSkill
- data-verifySkill
- deep-researcherSkill
- design-no-slopSkill
- enterprise-teamSkill
- git-craftSkill
- human-codingSkill
- laravel-architectSkill
- markdown-docSkill
- modern-stack-horizonSkill
- modern-web-guidanceSkill
- omni-pilotSkill
- perf-benchmarkSkill
- python-bug-fixerSkill
- react-ui-architectSkill
- reverse-engineer-anythingSkill
- typescript-nodeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 5 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Always invoke this skill whenever:
- Distinctive: line 21
Before reporting task completion to the user on any software or web development task.
- Distinctive: line 27
Always run the scan with JSON format so you can parse the file list, clean vs vulnerable status, and exact issue line numbers:
- Distinctive: line 47
When reporting to the user, always highlight which files are safe (Clean) and which files were vulnerable (and how you fixed them).
- Very specific: line 53
When issues are found, immediately locate issue.file and issue.line to apply the correct defensive fix:
- Very specific: line 58
Go:: Avoid exec.Command("sh", "-c", ...).
- Very specific: line 60
Shell/Bash: Avoid eval $var.
- Very specific: line 63
Python: Never use pickle.loads() on untrusted data.
- Very specific: line 65
Java: Avoid unvalidated ObjectInputStream.readObject().
- Very specific: line 68
Always normalize paths (e.g.
- Distinctive: line 78
Always use parameterized queries / prepared statements with parameter binding.
- Very specific: line 82
Remove raw API keys, passwords, and private tokens from source code.
- Very specific: line 85
Add missing headers: Content-Security-Policy, X-Frame-Options: SAMEORIGIN, X-Content-Type-Options: nosniff.
- Very specific: line 87
Ensure all forms have CSRF tokens and maxlength attributes on inputs.
- Very specific: line 93
Run npx --yes tyw-cli scan .
- Very specific: line 94
If any files are marked VULNERABLE, apply the fixes directly to the source code.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TYW Universal Software & Web Auditor Skill (tyw-audit)
This skill guides AI agents to autonomously audit, diagnose, and remediate code vulnerabilities and web flaws across ALL programming languages and software projects (CLI tools, automation scripts, backend APIs, systems code, and web applications) using the TYW CLI (npx --yes tyw-cli).
1. When to Trigger
Always invoke this skill whenever:
- You finish building, editing, or refactoring ANY code or project (Python, Go, Rust, C/C++, Java, Shell, PHP, Node.js/TypeScript, HTML/CSS).
- The user asks to check, audit, test, or verify code security, vulnerability, or health.
- Before reporting task completion to the user on any software or web development task.
2. Recommended Execution Commands
Always run the scan with JSON format so you can parse the file list, clean vs vulnerable status, and exact issue line numbers:
# 1. For non-web projects or when no dev server is running (CLI tools, Python scripts, Go/Rust/C apps):
npx --yes tyw-cli scan . --format json
# 2. For running web applications / dev servers (combines browser testing + source code scan):
npx --yes tyw-cli audit <URL> --code . --format json3. Interpreting Output & File Status
The output provides a clear breakdown of every file scanned:
summary.totalFilesScanned: Total count of code files examined.summary.cleanFilesCount: Count of safe files (0 vulnerabilities).summary.vulnerableFilesCount: Count of files containing detected vulnerabilities.fileStatuses: List of each file marked as"CLEAN"or"VULNERABLE".
When reporting to the user, always highlight which files are safe (Clean) and which files were vulnerable (and how you fixed them).
4. Automated Remediation Playbook (Multi-Language)
When issues are found, immediately locate issue.file and issue.line to apply the correct defensive fix:
A. Command Injection (CODE-CMD-INJECT-*)
- Python: Replace
subprocess.run(cmd, shell=True)withsubprocess.run(['cmd', arg1, arg2], shell=False). Avoidos.system(). - Node.js: Replace
child_process.exec()withchild_process.execFile()orspawn()with an argument array. - Go: Avoid
exec.Command("sh", "-c", ...). Execute the binary directly with isolated arguments. - C/C++: Replace
system()orpopen()withexecveorexecvp. - Shell/Bash: Avoid
eval $var.
B. Insecure Deserialization (CODE-DESERIALIZE-*)
- Python: Never use
pickle.loads()on untrusted data. Usejson.loads(). For YAML, useyaml.safe_load(). - PHP: Replace
unserialize()withjson_decode(). - Java: Avoid unvalidated
ObjectInputStream.readObject(). Use JSON or Protobuf.
C. Path Traversal (CODE-PATH-TRAVERSAL)
- Always normalize paths (e.g.
path.resolve,os.path.abspath) and assert that the target path starts with the allowed base directory before performing file I/O.
D. Memory Safety (CODE-MEM-BUFFER-OVERFLOW)
- C/C++: Replace
strcpy,strcat,gets, andsprintfwith bounded variants:strncpy,strncat,fgets,snprintf.
E. Weak Cryptography & Insecure Randomness (CODE-WEAK-*, CODE-INSECURE-*)
- Replace MD5 and SHA-1 with SHA-256 for hashing, or Argon2id/bcrypt for passwords.
- Replace
Math.random()orrandom.random()with cryptographically secure generators (crypto.randomBytes(),secrets.token_hex()).
F. SQL Injection & XSS (CODE-SQLI-*, CODE-XSS-*)
- Always use parameterized queries / prepared statements with parameter binding.
- Sanitize and escape all user outputs (
htmlspecialcharsin PHP,textContentin DOM).
G. Hardcoded Secrets (CODE-SECRET-HARDCODED)
- Remove raw API keys, passwords, and private tokens from source code. Load them from environment variables via
.env.
H. Live Web Security (When Auditing Web Servers)
- Add missing headers:
Content-Security-Policy,X-Frame-Options: SAMEORIGIN,X-Content-Type-Options: nosniff. - Set cookie flags:
HttpOnly; Secure; SameSite=Lax. - Ensure all forms have CSRF tokens and
maxlengthattributes on inputs.
5. The Verification Loop
- Run
npx --yes tyw-cli scan . --format json(or audit). - If any files are marked
VULNERABLE, apply the fixes directly to the source code. - Re-run the scan until
vulnerableFilesCount == 0and status isPASSED(Score >= 90). - Present the verified clean status to the user.
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
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.

