English | Русский
Security Rules
See also: security-checklist.md — OWASP Top 10 checklist.
Core principles
- Never trust user input — validate everything
- Least privilege — grant only what's needed
- Defense in depth — multiple layers of protection
- Fail safe — errors must not leak information
- Audit everything — log security events
OWASP Top 10 (brief)
A01: Broken Access Control
- Check authorization on EVERY endpoint
- Don't trust client-side data
- Verify resource ownership
A02: Cryptographic Failures
- Use argon2/bcrypt for passwords (NOT MD5/SHA1)
- Secrets via environment variables
- HTTPS required in production
A03: Injection
- Parameterized SQL queries
textContentinstead ofinnerHTML- Escape output for XSS prevention
A05: Security Misconfiguration
- Safe error messages
- Configured security headers
- Specific CORS (not
*)
A07: Authentication Failures
- Rate limiting on auth endpoints
- Secure cookie flags (httpOnly, secure, sameSite)
- Strong password requirements
Input validation
Required checks
- Data type
- Length / size
- Format (email, URL, etc)
- Allowed values (whitelist)
Where to validate
- At system boundaries (API, CLI, MCP) — always
- Inside trusted code paths — only at the boundary
- Client-side validation = UX only, not security
Authentication
Password requirements
- At least 12 characters
- Mix of uppercase, lowercase, digits, symbols
- Check against well-known breached-password lists
Cookie security
httpOnly: true — no JS access
secure: true — HTTPS only
sameSite: strict — CSRF protectionSecrets management
Never
- Hardcode secrets in source
- Commit
.envfiles - Log secret values
Do this instead
- Environment variables for local dev (gitignored
.env) - Production: secret manager (AWS Secrets Manager, HashiCorp Vault)
- Rotate keys periodically
.gitignore for secrets
.env
.env.*
!.env.example
secrets/
*.pem
*.keyAudit logging
What to log
- All authentication events (success + failure)
- Permission changes
- Sensitive data access
- Configuration / administrative actions
What NOT to log
- Passwords (even hashed)
- API keys
- Session tokens
- Card numbers
- PII in cleartext
Logs must contain: timestamp, actor, action, resource.
Checklists
Pre-commit
- [ ] No hardcoded secrets
- [ ] Input validation on all endpoints
- [ ] Authorization checks present
- [ ] Error messages don't leak information
- [ ] No SQL / command injection
- [ ] Rate limiting on sensitive endpoints
Pre-deploy
- [ ] Dependencies scanned for vulnerabilities
- [ ] Security headers configured
- [ ] HTTPS enforced
- [ ] Secrets in proper storage
- [ ] Logging configured correctly
TAUSIK-specific guards
bash_firewall.pyblocksrm -rf /,Remove-Item -Recurse -Force C:\,git reset --hard origin, force-push — on both shell channels, Bash and PowerShell. Full channel-coverage matrix:enforcement-coverage.mdgit_push_gate.pyrequires a fresh, single-use ticket at.tausik/.push_ticket.json, written bytausik push-ok(60s TTL, bound to HEAD SHA)./shipand/commitruntausik push-ok && git pushafter user "y". The historicalTAUSIK_ALLOW_PUSH=1env path was broken-by-design (inline env never reached harness-level hooks) and was removed in v1.4.TAUSIK_SKIP_PUSH_HOOK=1remains as a debug-only bypass.memory_pretool_block.pyblocks Write/Edit/MultiEdit and Bash/PowerShell writes to any foreign memory sink —~/.claude/**/memory/,.cursor/rules/,.windsurf/rules/,.github/copilot-instructions.md,.clinerules,.roo/rules/,.continue/rules/,.aider*(deny-list:scripts/memory_sinks.py)memory_routegate + thepre-commithook enforce the same deny-list IDE-agnostically over the working tree; the litmus block in the generated rule files covers hosts whose memory is cloud-side and writes no file at allpublication_boundary.py(overbrain_scrubbing's detectors) redacts paths, e-mails, private URLs and project names inknowledge export --redacted- Slug validation in role/stack scaffold blocks path traversal
- A default gate's command cannot be pointed at a different tool:
.tausik/config.jsontravels with the repository, so an override ofgates.<name>.commandmust keep invoking the default's tool. Arguments, paths and runner wrappers stay free (vendor/bin/phpstan analyse --level=8is accepted, and so iseslint {files}against a default ofnpx eslint {files}— wrappers are seen through); the tool does not (python -c passin place ofruffis refused and the default command is kept) - Skill installs are gated on both paths into the activated tree —
install(skill_manager.copy_skill) andactivate(service_skills.skill_activate): publisher signature (ed25519, per-repo pinned key), path-traversal and symlink guards, and a shared invisible-Unicode content scan (skill_content_scan.assert_skill_tree_clean) that refuses a skill hiding agent-directed instructions in zero-width / bidi / U+E0000 tag-block characters across every prose/config/script file it ships. Full model:skill-supply-chain-threat-model.md
Limits of these guarantees
Supervision is machine-checked where a machine can check it. What remains is written down here honestly rather than left implied.
- Inert arguments to the same tool are NOT detected. The check compares the tool being invoked, not the meaning of the invocation, so
ruff --versionorpytest --collect-onlyin an override will pass: the tool is the right one, the gate is nominally enabled, and it is green forever. There is no machine-checkable definition of "this command does real work", and a rule requiring the command to start with the default prefix would break both the vendored-path case and the legitimate dropping of annpxwrapper. Read gate command overrides in a foreign repository with your own eyes — a gate that goes green suspiciously fast deserves a look at its command. - Built-in gates (
filesize,class_surface,tdd_order,renar_drift_*) have no command at all; an attempt to add one is refused.