# Claude Code for QA and security triage

> Run Playwright with workers 1 in CI, triage Dependabot with /review, and block risky shell via hooks.

Source: https://fullbytedeveloper.com/blog/claude-code-for-qa-security-triage
Published here: 2026-11-26, updated 2026-11-26

QA and security triage with Claude Code works when Playwright CI sets workers to 1, Dependabot alerts get a /review pass, and PreToolUse hooks exit 2 on risky shell. Flakes drop when parallel workers stay off in CI per Playwright's CI guide. [1] [2]

After this page you can scaffold Playwright with workers locked to 1, triage Dependabot with Engineering `/review`, and block risky shell with deny rules and hooks. Related: [Claude Code deny rules](/blog/claude-code-deny-rules), [Claude Code for DevOps and CI/CD](/blog/claude-code-for-devops-ci-cd), [Claude Code for coding](/blog/claude-code-for-coding). Browse the [Claude Code topic](https://fullbytedeveloper.com/blog/topic/claude-code).

## Scaffold Playwright, then lock CI to workers 1

Playwright's intro uses `npm init playwright@latest` to add config, browsers, and an example test (optional GitHub Actions workflow). CI docs install with `npm ci`, then `npx playwright install --with-deps`, then `npx playwright test`, and recommend `workers: 1` in CI for stability and reproducibility. [1] [2]

```bash
npm init playwright@latest
```

```yaml
# CI shape from Playwright CI docs
- run: npm ci
- run: npx playwright install --with-deps
- run: npx playwright test
```

```ts
// playwright.config.ts excerpt for CI
export default defineConfig({
  workers: process.env.CI ? 1 : undefined,
});
```

Ask Claude to add failing specs from a bug report before it edits product code. Best practices: a failing check defines "done". [6]

You should see the same failure locally and in CI when workers are 1. [1]

## Triage Dependabot PRs with Engineering /review

When Dependabot security updates are enabled, Dependabot opens pull requests for alerts that have an available patch. Treat each PR as a change set: read the advisory, run tests, then `/review` on the diff. [3] [4]

```bash
claude plugin marketplace add anthropics/knowledge-work-plugins
claude plugin install engineering@knowledge-work-plugins
```

```text
/review https://github.com/org/repo/pull/456
```

Do not auto-merge on the label alone. Ask Claude to summarize breaking changes in the changelog and to name the test command that proves the app still boots. [3] [6]

## Keep secrets out with deny rules and hooks

Deny rules in `.claude/settings.json` stop Read/Bash patterns for `.env` and secrets paths; details live on [Claude Code deny rules](/blog/claude-code-deny-rules). Hooks add pattern blocks deny rules miss: on `PreToolUse`, exit code 2 refuses the tool call and returns stderr. [5] [7]

```json title=".claude/settings.json"
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/block-prod-shell.sh"
          }
        ]
      }
    ]
  }
}
```

Block force-push, production `kubectl`, and secret exfil patterns in that script. Keep the matcher narrow enough that `npm test` still runs. [5] [6]

**Warning:** instruction files are guidance. Markdown "never" lines do not replace hooks or deny rules. [5] [6]

## Close triage with evidence, not labels

For each Dependabot or Playwright failure, ask for severity, owning package or spec, repro command, and fix PR link. Re-run Playwright with workers 1 after the fix. Then: red CI or alert, `/review` on the fix, green jobs, person merges. The agent does not dismiss alerts without a cited reason. [1] [3] [4]

For workflow YAML and deploy checklists, continue on [Claude Code for DevOps and CI/CD](/blog/claude-code-for-devops-ci-cd). For broader coding hooks and memory, use [Claude Code for coding](/blog/claude-code-for-coding). [8] [9]

You now have a QA and security loop: Playwright CI with workers 1, Dependabot review via `/review`, deny rules plus hooks, human merge.

Send this to the QA lead who wants Claude triaging alerts without force pushing or reading env files.

## Sources

1. [Playwright docs: CI introduction, accessed 2026-11-26](https://playwright.dev/docs/ci)
2. [Playwright docs: Getting started, accessed 2026-11-26](https://playwright.dev/docs/intro)
3. [Anthropic Engineering plugin README, accessed 2026-11-26](https://raw.githubusercontent.com/anthropics/knowledge-work-plugins/main/engineering/README.md)
4. [GitHub Docs: About Dependabot security updates, accessed 2026-11-26](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates)
5. [Claude Code docs: Hooks, accessed 2026-11-26](https://code.claude.com/docs/en/hooks)
6. [Claude Code best practices, accessed 2026-11-26](https://code.claude.com/docs/en/best-practices)
7. [Full Byte Developer: Claude Code deny rules](https://fullbytedeveloper.com/blog/claude-code-deny-rules)
8. [Full Byte Developer: Claude Code for DevOps and CI/CD](https://fullbytedeveloper.com/blog/claude-code-for-devops-ci-cd)
9. [Full Byte Developer: Claude Code for coding](https://fullbytedeveloper.com/blog/claude-code-for-coding)
