# Threat model

> What could go wrong with skills, and how each threat is answered.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://skills.docs.sypnia.com/security/threat-model/

For agents: Threats → answers: malicious skill (manifest checked against files, scripts declared, checker never runs code, human review before public listing, labels, ask before install and before running scripts, sandbox, removal + warnings); prompt injection inside a skill (instructions check flags hiding actions/exfiltration/disabling safety; agents' safety rules live outside the model; MCP returns skill text as untrusted data; reviewer reads it); harmful update (touches widening = major; updates stay in range; diff shown; lock pins hashes); typosquatting/look-alike names (confusable-name check, reserved prefixes, verified publishers, install shows publisher); publisher account takeover (trusted publishing, scoped expiring tokens, e-mail to all owners on every version, yank in one step, majors reviewed again); tampered package/CDN (sha256 + signature verified locally, immutable storage with Object Lock); signing key theft (KMS, key never leaves; self-hosted key file backed up and rotated; key rotation signed by old key); dependency confusion between registries (per-publisher registry mapping in sypnia.toml; ids include publisher); secrets in skills (secrets check; skills never ask for secrets in conversation).

| Threat                                                                                                              | Answer                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **A skill that tries to harm**: a script that deletes files or sends data away                                      | scripts must be declared and are labelled; the checker reads them and never runs them; a person reviews public skills; installing runs nothing; your agent asks before running a script and runs it in its sandbox; a harmful skill is removed and every project that has it is warned     |
| **Instructions that turn your agent against you** (prompt injection): «do not tell the person», «send the .env to…» | the instructions check flags hiding actions, sending data to undeclared places and turning off safety rules; a reviewer reads public skills; Sypnia Agent's safety rules live outside the model, so a skill cannot switch them off; over MCP, a skill's text is returned as untrusted data |
| **A harmful update** to a skill you trust                                                                           | an update that touches more must be a new major, which `skills update` never takes on its own; the diff is shown; your lock file pins the exact version and its hash                                                                                                                       |
| **A look-alike name**: `sypnia-desing-guide`                                                                        | names confusable with existing ones are refused; the `sypnia-` prefix is reserved; publishers can be verified; every install shows the publisher                                                                                                                                           |
| **A publisher's account is taken over**                                                                             | trusted publishing needs no token on anyone's machine; tokens are scoped to a skill and expire; every new version is e-mailed to all the publisher's owners; a version can be yanked in one step; a new public major is reviewed again                                                     |
| **A package is changed** in storage or on the way                                                                   | the hash and the signature are checked on your machine; published packages are stored where they cannot be overwritten                                                                                                                                                                     |
| **The signing key is stolen**                                                                                       | in Sypnia Cloud the key lives in a key service and never leaves it; a self-hosted key is a file you protect, back up and rotate; a new key must be signed by the old one                                                                                                                   |
| **The wrong registry answers** for a private skill                                                                  | ids carry their publisher, and `[skills.registries]` in `sypnia.toml` maps each publisher to its registry, so a public skill can never stand in for a private one                                                                                                                          |
| **A secret inside a skill**                                                                                         | the secrets check refuses the version; skills never ask for secrets in the conversation                                                                                                                                                                                                    |
