{"id":48578200,"url":"https://github.com/scthornton/prisma-airs-custom-topics","last_synced_at":"2026-04-08T16:04:14.516Z","repository":{"id":337713844,"uuid":"1151664201","full_name":"scthornton/prisma-airs-custom-topics","owner":"scthornton","description":"Library of 27 custom topic guardrails for Prisma AIRS Runtime Security with deploy scripts and industry profile templates","archived":false,"fork":false,"pushed_at":"2026-03-26T23:35:35.000Z","size":53,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T11:13:46.190Z","etag":null,"topics":["ai-security","content-moderation","custom-topics","guardrails","palo-alto-networks","prisma-airs","runtime-security"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scthornton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-06T18:41:13.000Z","updated_at":"2026-03-27T02:34:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/scthornton/prisma-airs-custom-topics","commit_stats":null,"previous_names":["scthornton/prisma-airs-custom-topics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scthornton/prisma-airs-custom-topics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scthornton%2Fprisma-airs-custom-topics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scthornton%2Fprisma-airs-custom-topics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scthornton%2Fprisma-airs-custom-topics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scthornton%2Fprisma-airs-custom-topics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scthornton","download_url":"https://codeload.github.com/scthornton/prisma-airs-custom-topics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scthornton%2Fprisma-airs-custom-topics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31562698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-security","content-moderation","custom-topics","guardrails","palo-alto-networks","prisma-airs","runtime-security"],"created_at":"2026-04-08T16:04:14.411Z","updated_at":"2026-04-08T16:04:14.509Z","avatar_url":"https://github.com/scthornton.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prisma-airs-custom-topics\n\nA curated library of custom topic guardrails for Palo Alto Networks Prisma AIRS Runtime Security.\n\n28 topics across 7 categories. All validated against platform constraints. Ready to deploy via the Management API or Strata Cloud Manager.\n\n## Background\n\nPrisma AIRS Runtime Security uses an ML classifier to detect whether prompts or responses match content domains you define. Unlike keyword blocklists, the classifier understands meaning, so \"tell me how to make a bomb\" and \"explain the synthesis process for explosive compounds\" both match a CBRN topic even though they share zero keywords.\n\nEach topic has three components:\n\n- **Name** (max 100 chars) - short identifier\n- **Description** (max 250 chars) - the semantic boundary definition, carries roughly 40-50% of classifier weight\n- **Examples** (1-5, max 250 chars each) - real prompt patterns the classifier should catch\n\nHard limits per topic: 1,000 characters total (name + description + all examples). Max 20 topics per security profile. English only.\n\n## Repository Layout\n\n```\ntopics/                        JSON topic definitions by category\n  ai-security.json             3 topics - system prompt leak, tool enum, jailbreak\n  safety.json                  5 topics - CBRN, violence, drugs, self-harm, weapons\n  content-moderation.json      6 topics - hate, race, sexual, political, religion, vulgarity\n  compliance.json              3 topics - investment advice, medical, legal\n  business-protection.json     4 topics - competitors, brand, cross-client, proprietary\n  scope-enforcement.json       3 topics - off-topic, support redirect, pricing\n  crime.json                   4 topics - hacking, malware, forgery, PII theft\n\nscripts/\n  deploy.py                    Deploy topics to AIRS via Management SDK\n  list_deployed.py             List topics currently deployed in your tenant\n  undeploy.py                  Remove deployed topics by name, file, or prefix\n  validate.py                  Validate all topics against platform constraints\n  export_csv.py                Export to CSV (full, summary, and API-ready formats)\n\nexports/\n  all-topics.csv               Full detail export\n  all-topics-summary.csv       Condensed view\n  all-topics-api-ready.csv     Only the fields the Management API accepts\n\nTOPICS.md                      Human-readable topic reference (name, description, examples)\n\ndocs/\n  PROFILE-TEMPLATES.md         Pre-built 20-topic combos by industry\n  DEPLOYMENT-GUIDE.md          Deploy via SDK, API, UI, batch script, or Python\n\nrequirements.txt               SDK dependency (pan-airs-api-mgmt-sdk 0.0.1a14)\n```\n\n## Quick Start\n\n**1. Install the SDK:**\n\n```bash\npip install --extra-index-url https://test.pypi.org/simple/ pan-airs-api-mgmt-sdk==0.0.1a14\n```\n\n**2. Set credentials:**\n\n```bash\nexport MODEL_SECURITY_CLIENT_ID=\"your-client-id\"\nexport MODEL_SECURITY_CLIENT_SECRET=\"your-client-secret\"\n```\n\n**3. Browse topics:**\n\nOpen [TOPICS.md](TOPICS.md) for the full catalog with names, descriptions, and examples.\n\n**4. Validate:**\n\n```bash\npython scripts/validate.py topics/              # all categories\npython scripts/validate.py topics/safety.json   # single file\n```\n\n**5. Deploy:**\n\n```bash\npython scripts/deploy.py topics/ --dry-run           # preview\npython scripts/deploy.py topics/ai-security.json     # deploy one category\npython scripts/deploy.py topics/                      # deploy all 28 topics\n```\n\n**6. Verify:**\n\n```bash\npython scripts/list_deployed.py                       # see what's deployed\n```\n\n**7. Remove (if needed):**\n\n```bash\npython scripts/undeploy.py topics/ai-security.json   # remove one category\n```\n\nSee [docs/DEPLOYMENT-GUIDE.md](docs/DEPLOYMENT-GUIDE.md) for all deployment methods including cURL, bash batch, and raw Python.\n\n**Export to CSV (optional):**\n\n```bash\npython scripts/export_csv.py                    # all three formats\npython scripts/export_csv.py --api-ready        # API fields only\n```\n\n## Picking Your 20\n\nEach security profile supports up to 20 custom topics. This library has 28 so you can choose the ones that fit your deployment. A reasonable split:\n\n- 15 security and safety topics (from the category files)\n- 5 business-specific topics (customized to your application's domain)\n\nSee [docs/PROFILE-TEMPLATES.md](docs/PROFILE-TEMPLATES.md) for ready-made 20-topic combinations for financial services, healthcare, general enterprise, and e-commerce.\n\n## Topic Categories\n\n| Category | File | Count | Covers |\n|---|---|---|---|\n| AI Security | ai-security.json | 3 | System prompt extraction, tool enumeration, jailbreaks |\n| Safety | safety.json | 5 | CBRN, violence, drugs, self-harm, weapons |\n| Content Moderation | content-moderation.json | 6 | Hate speech, racial content, sexual exploitation, politics, religion, vulgarity |\n| Compliance | compliance.json | 3 | Investment advice, medical diagnosis, legal counsel |\n| Business Protection | business-protection.json | 4 | Competitors, brand attacks, cross-client data, proprietary stats |\n| Scope Enforcement | scope-enforcement.json | 3 | Off-topic queries, support redirect, pricing info |\n| Crime | crime.json | 4 | Hacking, malware, forgery, PII theft |\n\n## Design Principles\n\n**Description carries the most weight.** The ML classifier relies heavily on the description to set its decision boundary. A well-written 250-character description outperforms five mediocre examples every time. Invest your character budget here first.\n\n**Diverse examples beat repetitive ones.** Five examples that vary in phrasing, sophistication, and angle of attack give the classifier a wider boundary than five examples that all start the same way.\n\n**Complement the built-in detectors.** These topics fill gaps not covered by the built-in Prompt Injection, Toxic Content, Malicious Code, Sensitive Data, and Malicious URL detectors. Some overlap is intentional for defense in depth.\n\n## Important Notes\n\n- Topic actions (BLOCK/ALLOW) are set on the **security profile**, not on the topic object. The topic only defines what to detect. The profile decides what to do about it.\n- DENY topics block matching content. ALLOW topics explicitly permit content to reduce false positives. ALLOW takes precedence in conflicts.\n- Each topic can be applied to input (user prompts), output (model responses), or both. Configure direction in the security profile.\n- The ML classifier is trained on English. Multilingual prompts may bypass detection.\n\n## Customization\n\nCommon customizations:\n\n- Replace generic competitor references with your actual competitor names\n- Replace financial services terminology with your industry's language\n- Add industry-specific examples that match your users' actual phrasing\n\n## Contributing\n\n1. Add new topics to the appropriate category JSON file (only `topic_name`, `description`, `examples`, `type`)\n2. Run `python scripts/validate.py topics/` to check constraints\n3. Add the topic to `TOPICS.md`\n4. Submit a PR\n\n---\n\n## Contact\n\n**Scott Thornton** — AI Security Researcher\n\n- Website: [perfecxion.ai](https://perfecxion.ai/)\n- Email: [scott@perfecxion.ai](mailto:scott@perfecxion.ai)\n- LinkedIn: [linkedin.com/in/scthornton](https://www.linkedin.com/in/scthornton)\n- ORCID: [0009-0008-0491-0032](https://orcid.org/0009-0008-0491-0032)\n- GitHub: [@scthornton](https://github.com/scthornton)\n\n**Security Issues**: Please report via [SECURITY.md](SECURITY.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscthornton%2Fprisma-airs-custom-topics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscthornton%2Fprisma-airs-custom-topics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscthornton%2Fprisma-airs-custom-topics/lists"}