Skip to content

feat: add warlock v1#124

Open
sarahxsanders wants to merge 6 commits intomainfrom
add-warlock
Open

feat: add warlock v1#124
sarahxsanders wants to merge 6 commits intomainfrom
add-warlock

Conversation

@sarahxsanders
Copy link
Copy Markdown
Collaborator

@sarahxsanders sarahxsanders commented May 1, 2026

merge after this one is shipped https://github.com/PostHog/warlock/pull/27

the warlock is here. wiring this up as a git dependency for now, will swap to the npm package once its published

changes

  • created scan-warlock.js - Node.js replacement for scan-prompt-injection.sh
  • added pnpm scan:skills to scan built ZIPs and pnpm scan <file> to scan individual files locally
  • updated CI workflows to use the new script
  • added pnpm-workspace.yaml to allow warlock's build scipt to run on install
  • added llm triage layer >:]

known limitations, going to address in a follow up

  • git dependencies are slower than npm, this is just temp until we publish to npm. it's an easy swap

test

pnpm install
pnpm build
pnpm scan:skills                    # scan all built skill ZIPs
pnpm scan path/to/some/file.md      # scan a specific file

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci misc
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci misc/quack-quack
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

@sarahxsanders sarahxsanders requested review from a team and edwinyjlim May 4, 2026 14:52
@sarahxsanders sarahxsanders marked this pull request as ready for review May 5, 2026 14:20
@sarahxsanders sarahxsanders marked this pull request as draft May 6, 2026 15:07
Comment thread scripts/scan-warlock.js Fixed
Comment thread scripts/scan-warlock.js Fixed
sarahxsanders and others added 2 commits May 6, 2026 16:50
…ring sanitization'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Comment thread package.json
Comment on lines +14 to +15
"scan": "node scripts/scan-warlock.js",
"scan:skills": "node scripts/scan-warlock.js dist/skills"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's rename to warlock or warlock-scan or security-scan, something that implies safety check

Copy link
Copy Markdown
Member

@edwinyjlim edwinyjlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

STOKED

Comment thread scripts/scan-warlock.js
Comment on lines +280 to +285
const combinedContent = [...uniqueFiles.entries()]
.map(([label, content]) => `--- ${label} ---\n${content.slice(0, 2000)}`)
.join("\n\n");

const triaged = llmProvider
? await triageMatches(combinedContent, rawMatches, llmProvider)
Copy link
Copy Markdown
Member

@edwinyjlim edwinyjlim May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might need to handle the scenario where the message becomes too large

@sarahxsanders sarahxsanders marked this pull request as ready for review May 6, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants