Skip to content

Add CLAUDE.md for Claude Code onboarding (AST-146794)#1474

Open
cx-anurag-dalke wants to merge 2 commits intomainfrom
feature/AST-146794
Open

Add CLAUDE.md for Claude Code onboarding (AST-146794)#1474
cx-anurag-dalke wants to merge 2 commits intomainfrom
feature/AST-146794

Conversation

@cx-anurag-dalke
Copy link
Copy Markdown
Contributor

Summary

  • Adds comprehensive CLAUDE.md file to guide Claude Code when working in this repository
  • Covers project architecture (layered design, plugin ecosystem context), development setup (build, test, lint, coverage commands), testing strategy (unit/integration patterns, coverage thresholds, test file rules), deployment process, proxy configuration, debugging steps, and contributing guidelines
  • References internal Confluence documentation (Architecture Plugins, CLI Handover pages)

Test plan

  • Verify CLAUDE.md renders correctly on GitHub
  • Confirm all referenced file paths and commands are accurate
  • Validate Confluence links are accessible

Generated with Claude Code

Comprehensive guidance file covering project architecture, development
setup, testing strategy, deployment process, proxy configuration,
debugging steps, and contributing guidelines.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

Logo
Checkmarx One – Scan Summary & Details250104a8-289c-4ad5-b9a8-f2267436f3b9


New Issues (1) Checkmarx found the following issues in this Pull Request
# Severity Issue Source File / Package Checkmarx Insight
1 HIGH CVE-2026-35172 Go-github.com/distribution/distribution/v3-v3.0.1-0.20250403190400-dbca4995c83c
detailsDescription: Distribution is a toolkit to pack, ship, store, and deliver container content. Prior to 3.1.0, distribution can restore read access in repo a after...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package

Copy link
Copy Markdown
Contributor

@cx-atish-jadhav cx-atish-jadhav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting together this CLAUDE.md — it's well structured and covers all the sections required by the epic. Left a few inline remarks where the content drifts from what's actually in the repo today. Please verify and update before merging.

Comment thread CLAUDE.md
4. **Retrieve results:** `cx results show --scan-id "<id>" --report-format "json"` (supports json, sarif, pdf, sbom)
5. **Integrate findings:** PR decoration, IDE feedback, CI/CD pipeline exit codes

Scans can target local directories (`--file-source`), Git repos (`--repo-url`), or container images (`--container-image`). Multiple engines can run simultaneously via `--scan-types`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag name is incorrect. The actual flag defined in internal/params/flags.go is ContainerImagesFlag = "container-images" (plural). Please update --container-image to --container-images.

Comment thread CLAUDE.md
- **Auth:** golang-jwt/jwt/v5 v5.2.2, gokrb5/v8 (Kerberos), alexbrainman/sspi (Windows NTLM)
- **Container Analysis:** containers-resolver, containers-images-extractor, anchore/syft (SBOM)
- **Testing:** stretchr/testify v1.11.1, gotest.tools
- **Linting:** golangci-lint v2 with 19 enabled linters
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter count is off. Counting the entries in linters.enable in .golangci.yml, there are 20 enabled linters (bodyclose, depguard, dogsled, dupl, errcheck, funlen, gochecknoinits, goconst, gocritic, gocyclo, ineffassign, mnd, nakedret, revive, rowserrcheck, staticcheck, unconvert, unparam, unused, whitespace), not 19. Please update here and at line 168.

Comment thread CLAUDE.md
### Linting & Static Analysis

```bash
# Run full linter suite (19 linters, see .golangci.yml)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as line 97 — the comment says 19 linters but there are actually 20 enabled in .golangci.yml.

Comment thread CLAUDE.md
| `PR_GITHUB_TOKEN`, `PR_GITLAB_TOKEN`, `AZURE_TOKEN` | PR decoration tests |
| `PROXY_HOST`, `PROXY_PORT`, `PROXY_USERNAME`, `PROXY_PASSWORD` | Proxy tests |

No `.env.example` file exists — refer to `.github/workflows/ci-tests.yml` (lines 54-96) for the full list of required secrets.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: the actual env var block in .github/workflows/ci-tests.yml spans lines 55-93, not 54-96. Please either correct the range or phrase it as approximate ("see the env: block under Go Integration test") to avoid it going stale.

Comment thread CLAUDE.md
- **Environment variables:** `CX_` prefix in SCREAMING_SNAKE_CASE (e.g., `CX_BASE_URI`, `CX_CLIENT_ID`)
- **Max function length:** 200 lines / 100 statements (`funlen`)
- **Max cyclomatic complexity:** 15 (`gocyclo`)
- **Max line length:** 185 characters (`lll`)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lll is present under settings in .golangci.yml but it is not enabled in linters.enable, so the 185-char line length is not actually enforced by the linter today. Either remove this bullet or call out that it's a configured-but-not-enabled setting so Claude doesn't treat it as a hard rule.

Comment thread CLAUDE.md

### Coverage Thresholds

- **Unit tests:** **85%** minimum (CI-enforced)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This coverage threshold is incorrect. CI (.github/workflows/ci-tests.yml line 25) enforces EXPECTED_CODE_COV=77.7 for unit tests, not 85%. The 75% integration threshold on the next line is correct (line 109 of the workflow). Please update 85%77.7%.

Comment thread CLAUDE.md

### Integration Test Patterns

Integration tests use real HTTP wrappers (not mocks) and hit the **Canary environment** (`deu.ast.checkmarx.net`). The key setup function is `createASTIntegrationTestCommand(t)` in `test/integration/util_command.go`:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider whether deu.ast.checkmarx.net should be listed verbatim in a public-facing doc. The integration env is controlled through CI secrets (CX_BASE_URI) — referring to it as "the Checkmarx One integration/Canary environment configured via CX_BASE_URI" avoids hardcoding an internal hostname into the repo.

Comment thread CLAUDE.md
| `ci-tests.yml` | Unit tests, integration tests, lint, govulncheck, Trivy |
| `release.yml` | Full build, sign, publish, notify pipeline |
| `issue_automation.yml` | Auto-label and assign issues |
| `pr-automation.yml` | Auto-assign reviewers, enforce PR guidelines |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pr-automation.yml does not exist in .github/workflows/. The actual PR-related workflows are pr-add-reviewers.yml, pr-label.yml, and pr-linter.yml. Please replace this row with the real filenames.

Comment thread CLAUDE.md
| `issue_automation.yml` | Auto-label and assign issues |
| `pr-automation.yml` | Auto-assign reviewers, enforce PR guidelines |
| `checkmarx-one-scan.yml` | Security scan on PRs |
| `update-trivy.yml` | Keep Trivy vulnerability definitions current |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update-trivy.yml does not exist. The actual file is trivy-cache.yml. Also, this table is missing several workflows that do exist: ai-code-review.yml, dependabot-auto-merge.yml, and nightly-parallel.yml. Please correct the filename and add the missing entries so the table reflects the full set under .github/workflows/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants