PrepGenAICerts
← Back to Labs

CI/CD Command

claude code workflows✓Fill in Blank

Complete this CI pipeline command that runs Claude Code in non-interactive mode with structured JSON output for automated processing.

#!/bin/bash
# CI pipeline step: automated security review with structured output

# Run Claude Code in non-interactive mode
claude  "Review this PR for security issues" \
   \
  --json-schema '{"type":"object","properties":{"findings":{"type":"array"}}}'

# Parse the JSON output and post findings as PR comments
cat output.json | jq '.findings[]' | while read finding; do
  gh pr comment "$PR_NUMBER" --body "$finding"
done
Next Exercise →

PrepGenAICerts is an independent exam-prep site. It is not affiliated with, endorsed by, or sponsored by Anthropic, PBC. Claude and Anthropic are trademarks of Anthropic, PBC. Exam details are taken from publicly available Anthropic and Pearson documentation. About PrepGenAICerts.