diff --git a/.github/workflows/warden.yml b/.github/workflows/warden.yml new file mode 100644 index 00000000..b4dd2b42 --- /dev/null +++ b/.github/workflows/warden.yml @@ -0,0 +1,27 @@ +name: Warden + +permissions: + contents: read + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + review: + runs-on: ubuntu-latest + env: + WARDEN_ANTHROPIC_API_KEY: ${{ secrets.WARDEN_ANTHROPIC_API_KEY }} + WARDEN_MODEL: ${{ secrets.WARDEN_MODEL }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.WARDEN_APP_ID }} + private-key: ${{ secrets.WARDEN_PRIVATE_KEY }} + + - uses: getsentry/warden@v0 + with: + github-token: ${{ steps.app-token.outputs.token }} diff --git a/warden.toml b/warden.toml new file mode 100644 index 00000000..4a501e56 --- /dev/null +++ b/warden.toml @@ -0,0 +1,43 @@ +# Warden Configuration +# https://github.com/getsentry/warden + +version = 1 + +[defaults] +failOn = "critical" +reportOn = "medium" + +# Find bugs and vulnerabilities in code changes +[[skills]] +name = "find-bugs" +remote = "getsentry/skills" + +[[skills.triggers]] +type = "pull_request" +actions = ["opened", "synchronize", "reopened"] + +# Security review following OWASP guidelines +[[skills]] +name = "security-review" +remote = "getsentry/skills" + +[[skills.triggers]] +type = "pull_request" +actions = ["opened", "synchronize", "reopened"] + +# Code review following Sentry engineering practices +[[skills]] +name = "code-review" +remote = "getsentry/skills" + +[[skills.triggers]] +type = "pull_request" +actions = ["opened", "synchronize", "reopened"] + +# Simplify and refine code for clarity and maintainability +[[skills]] +name = "code-simplifier" +remote = "getsentry/skills" + +[[skills.triggers]] +type = "local"