Skip to content

Commit 1637e49

Browse files
Merge pull request #62 from Contrast-Security-OSS/AIML-149-update-claude-documentation
AIML-149: Claude documentation updates and fixes
2 parents b30935a + d71b6ee commit 1637e49

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

docs/claude_code.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ When the `@claude` handle is mentioned in the title of a SmartFix-created GitHub
2222

2323
* **Contrast Assess:** You need an active Contrast Assess deployment identifying vulnerabilities in your application.
2424
* **GitHub:** Your project must be hosted on GitHub and use GitHub Actions. In the GitHub repository's Settings, enable the Actions > General > Workflow Permissions checkbox for "Allow GitHub Actions to create and approve pull requests".
25-
* **Claude Code Requirements:**
26-
* GitHub repository with **Issues** and **GitHub Copilot** enabled
27-
* GitHub Personal Access Token (PAT) with:
25+
* **Claude Code Requirements:**
26+
* Follow the Claude setup docs: [Claude Code GitHub Actions](https://docs.claude.com/en/docs/claude-code/github-actions#setup)
27+
* Install the [Claude Code GitHub App](https://github.com/apps/claude) on your GitHub repository.
28+
* Copy the [claude.yml](https://github.com/anthropics/claude-code-action/blob/main/examples/claude.yml) workflow file example into your GitHub repository
29+
* GitHub repository with **Issues** enabled
30+
* GitHub Personal Access Token (PAT) with:
2831
* `meta` (read permissions)
2932
* `actions` (read permissions)
3033
* `pulls` (read-write permissions)
@@ -68,6 +71,7 @@ jobs:
6871
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
6972
steps:
7073
# When using Claude Code, it is unnecessary to authenticate with an LLM API from this step.
74+
# You must authenticate with your LLM provider in the claude.yml workflow file instead.
7175
7276
- name: Checkout repository
7377
uses: actions/checkout@v4
@@ -106,6 +110,7 @@ jobs:
106110
uses: Contrast-Security-OSS/contrast-ai-smartfix-action@v1 # Replace with the latest version
107111
with:
108112
run_task: merge
113+
coding_agent: 'CLAUDE_CODE'
109114
# --- GitHub Token ---
110115
github_token: ${{ secrets.PAT_TOKEN }}
111116
# --- Contrast API Credentials ---
@@ -131,6 +136,7 @@ jobs:
131136
uses: Contrast-Security-OSS/contrast-ai-smartfix-action@v1 # Replace with the latest version
132137
with:
133138
run_task: closed
139+
coding_agent: 'CLAUDE_CODE'
134140
# --- GitHub Token ---
135141
github_token: ${{ secrets.PAT_TOKEN }}
136142
# --- Contrast API Credentials ---
@@ -193,7 +199,7 @@ SmartFix focuses on remediating:
193199

194200
## Configuration Inputs
195201

196-
The following are key inputs for the SmartFix GitHub Action using the GitHub Copilot coding agent. Refer to the `action.yml` in the SmartFix GitHub Action repository for a complete list and default values.
202+
The following are key inputs for the SmartFix GitHub Action using the GitHub Claude code coding agent. Refer to the `action.yml` in the SmartFix GitHub Action repository for a complete list and default values.
197203

198204
| Input | Description | Required | Default |
199205
| :---- | :---- | :---- | :---- |

src/github/external_coding_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ def _process_external_coding_agent_run(self, issue_number: int, issue_title: str
243243
if self.config.CODING_AGENT == CodingAgents.CLAUDE_CODE.name:
244244
if is_existing_issue:
245245
debug_log(f"Claude is going to reprocess exiting issue #{issue_number}.")
246-
# Let's wait 15 seconds to ensure the claude workflow run has started
246+
# Let's wait 25 seconds to ensure the claude workflow run has started
247247
# This should ensure we get the latest comment and workflow run ID
248-
time.sleep(15)
248+
time.sleep(25)
249249
pr_info = self._process_claude_workflow_run(issue_number, remediation_id)
250250
else:
251251
# GitHub Copilot agent

0 commit comments

Comments
 (0)