Security constraints
These exist for good reasons — don’t weaken them without understanding why:
storage.Write/Read/Deletevalidate paths stay withinBasePath(path traversal prevention)Unpackrejects symlinks, hardlinks, unknown tar entry types, files >1MiB, and total extraction >50MBMaxBytesReadermiddleware caps request bodies at 10MB (must be <maxUnpackSize)- Scanner runs on publish —
criticalandwarn(high severity) block publishing - Exfiltration and secret class findings are unappealable — no evaluation, no admin override, no suppression clears them. They return 422 and create no version row at all. Every other blocking finding holds the version for review instead, where a verified score at or above
QUALITY_FLOORor an owner/adminskael review --approvereleases it - A rescan of a stored version runs the same scan steps as a publish. An owner of the skill or an admin starts one from the Security tab,
POST /api/skills/{name}/versions/{version}/scanorskael rescan. An admin rescans every released version from Instance settings after a scanner change. A new exfiltration or secret finding withdraws a released version: the server never serves it again,latest_versionfalls back to the newest released version below it, andskael syncremoves it from each machine. The owners get an email when a mail server is set, the audit log gets an entry with the prior report, andskill.version.withdrawnfires. Only a new version releases the skill again. Any other new finding stays a flag on the Security tab, because a guess from the shape of a line must not pull a released skill - API key hashes are compared via
crypto/subtle.ConstantTimeCompare(after SHA-256 + hex.DecodeString) to prevent timing attacks X-Forwarded-For/X-Real-IPare read only when the connecting peer is insideTRUSTED_PROXIES; otherwise the socket address wins. Both headers are plain client input, and believing them unconditionally (as chi’s deprecatedRealIPdoes) lets one attacker present a fresh source address per request, defeating every per-IP limit- Hook scripts read credentials from
~/.skael/config.jsonat runtime — never embedded in agent config files - Sync verifies downloaded archive checksums against the manifest before extracting
- File permissions are masked to
0o777during extraction (no setuid/setgid) GET /api/users/searchis open to any authenticated user and returns{id, name, email}only — no role, no timestamps. Minimum 2 characters and a hard cap of 20 results, so it is a lookup rather than a directory export. Restricting it to admins would make delegated ownership unusable, which is the trade being madeownership.CanManageis the entire escalation surface of ownership. It permits narrowing only; a delegate can never widen their scope. The property test ininternal/ownership/manage_test.gois the guard — three individually-correct clauses can compose into a widening path that no per-clause test can see- A webhook delivery is the one request the server sends to an address a user chose. It needs
https, and it refuses private, loopback, link-local and shared (100.64.0.0/10) addresses. The check runs on the resolved IP at connection time and on each redirect, so a DNS change or a redirect cannot reach a metadata service.WEBHOOK_ALLOW_PRIVATE=trueopens private addresses, loopback andhttpfor a receiver on the install’s own network, and link-local stays refused. A delivery ignores proxy variables, because a proxy would hide the target from the check. See Webhooks