Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ jobs:
with:
version: latest

# TODO: Remove these two steps once @posthog/warlock is published to npm.
# They exist because warlock is currently installed as a private git dependency,
# so the CI runner needs credentials to clone it.
- name: Generate token for private dependencies
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_APP_POSTHOG_WIZARD_CI_BOT_APP_ID }}
private-key: ${{ secrets.GH_APP_POSTHOG_WIZARD_CI_BOT_PRIVATE_KEY }}
repositories: warlock

- name: Configure git auth for private deps
env:
APP_TOKEN: ${{ steps.app-token.outputs.token }}
run: git config --global url."https://x-access-token:${APP_TOKEN}@github.com/".insteadOf "https://github.com/"

- name: Install dependencies
run: pnpm install

Expand Down Expand Up @@ -114,8 +130,8 @@ jobs:
env:
BUILD_VERSION: ${{ steps.version.outputs.version }}

- name: Scan skills for prompt injection
run: bash scripts/scan-prompt-injection.sh dist/skills
- name: Scan skills with Warlock
run: node scripts/scan-warlock.js dist/skills

- name: List build artifacts
run: |
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,30 @@ jobs:
with:
version: latest

# TODO: Remove these two steps once @posthog/warlock is published to npm.
# They exist because warlock is currently installed as a private git dependency,
# so the CI runner needs credentials to clone it.
- name: Generate token for private dependencies
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_APP_POSTHOG_WIZARD_CI_BOT_APP_ID }}
private-key: ${{ secrets.GH_APP_POSTHOG_WIZARD_CI_BOT_PRIVATE_KEY }}
repositories: warlock

- name: Configure git auth for private deps
env:
APP_TOKEN: ${{ steps.app-token.outputs.token }}
run: git config --global url."https://x-access-token:${APP_TOKEN}@github.com/".insteadOf "https://github.com/"

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Scan skills for prompt injection
run: bash scripts/scan-prompt-injection.sh dist/skills
- name: Scan skills with Warlock
run: node scripts/scan-warlock.js dist/skills

- name: Lint env var naming conventions
run: bash scripts/lint-env-naming.sh
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@
"test:plugins:watch": "vitest scripts/plugins/tests",
"test:skills": "vitest run scripts/lib/tests",
"test:skills:watch": "vitest scripts/lib/tests",
"test": "vitest run scripts/plugins/tests scripts/lib/tests"
"test": "vitest run scripts/plugins/tests scripts/lib/tests",
"security-scan": "node scripts/scan-warlock.js",
"security-scan:skills": "node scripts/scan-warlock.js dist/skills"
},
"devDependencies": {
"archiver": "^7.0.1",
"vitest": "^2.0.0"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.95.0",
"@posthog/warlock": "git+https://github.com/PostHog/warlock.git",
"gray-matter": "^4.0.3",
"js-yaml": "^4.1.1"
}
Expand Down
85 changes: 85 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
onlyBuiltDependencies:
- "@posthog/warlock"
Loading
Loading