Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,20 @@ test-results/

# Agent Package Manager cache
apm_modules/
.claude/agents
.claude/commands
.claude/skills

# Claude Code working state
.claude/

# Kind swap tracking
.kind-swaps

# Security audit / threat-model working artifacts
security-audit/
.threat-model-state/
.skillspector-reports/

# Local tool binaries (built by make kind-prereqs)
bin/
110 changes: 110 additions & 0 deletions .skillspector-baseline.yaml

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Run it once in my local and gave me a couple of security warnings

=========================================
   SECURITY: HIGH/CRITICAL findings detected
  =========================================
    HIGH: PE3 in tests/e2e/drivers/kind.sh:81 - Credential Access
    HIGH: TM2 in .github/workflows/e2e.yml:204 - Chaining Abuse
Review these findings and either fix them or add to .skillspector-baseline.yaml
  make: *** [apm-install] Error 1

Then Calude analyzed the result and concluded that:

Both findings are false positives in test/CI files:

  1. PE3 in kind.sh:81 — acquire_oidc_token function for e2e tests getting a token from a local Keycloak; that's standard test infrastructure, not credential theft.
  2. TM2 in e2e.yml:204 — curl | sh to install openshell CLI from a known first-party repo; flagged as "chaining abuse" but it's a standard install pattern in CI.

Both files are already in directories that should be excluded (tests/ and .github/), but the baseline only covers scripts/* and components/*, not those paths.

It suggests to add exclusions:

- path: "tests/*"
   reason: "Test code - not agent skills"
- path: ".github/*"
   reason: "CI workflow definitions - not agent skills"

Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# SkillSpector baseline - suppress findings outside skill directories
# and false positives within skill directories.
version: 2
rules:
# --- Directory exclusions (not agent skills) ---
- path: "apm_modules/*"
reason: "Upstream dependencies - audited separately by package maintainers"
- path: "components/*"
reason: "Application source code - not agent skills"
- path: "deploy/*"
reason: "Deployment manifests - not agent skills"
- path: "scripts/*"
reason: "Build/CI scripts - not agent skills"
- path: "specs/*"
reason: "Specification documents - not agent skills"
- path: "security-audit/*"
reason: "Security audit artifacts - not agent skills"
- path: ".threat-model-state/*"
reason: "Threat model working state - not agent skills"
- path: "DEVELOPMENT.md"
reason: "Project documentation - not an agent skill"
- path: "LICENSE"
reason: "License file - not an agent skill"
- path: "Makefile"
reason: "Build file - not an agent skill"
- path: "apm.lock.yaml"
reason: "Lockfile - not an agent skill"
- path: ".skillspector-reports/*"
reason: "Local SkillSpector scan output - not source code"

# --- False positives in skill/command scripts ---

# AST4: All subprocess calls use shell=False with explicit arg lists
# calling gh/git CLIs - the safe pattern the rule recommends.
- id: "AST4"
path: "*pr-hygiene/scripts/*"
reason: "subprocess.run with shell=False and hardcoded gh/git arg lists - no user-controlled input"
- id: "AST4"
path: "*pr-review/scripts/*"
reason: "subprocess.run with shell=False and hardcoded gh/git arg lists - no user-controlled input"

# AS3: Standard APM @claude/skills/ cross-references, not skill enumeration.
- id: "AS3"
path: "*commands/finish-work.md"
reason: "Standard APM skill reference syntax (@claude/skills/...), not enumeration"
- id: "AS3"
path: "*commands/start-work.md"
reason: "Standard APM skill reference syntax (@claude/skills/...), not enumeration"
- id: "AS3"
path: "*scored-code-review/SKILL.md"
reason: "Deprecation stub referencing replacement skill path, not enumeration"

# E2: Reads GH_TOKEN/GH_TOKEN_<org> for gh CLI auth - never logs values.
- id: "E2"
path: "*pr-hygiene/scripts/pr-hygiene.py"
reason: "Standard GitHub CLI token resolution for multi-org scanning - values never logged"

# EA2: Guide-only skill (presents commands, user executes) and Jira
# issue creation (the skill's purpose, with user confirmation).
- id: "EA2"
path: "*acm-release/SKILL.md"
reason: "Guide-only skill - presents commands for user to run, never executes them"
- id: "EA2"
path: "*jira-log/SKILL.md"
reason: "Creating Jira issues is the skill's purpose - user confirmation built into workflow"

# MP3: Coverage table documenting local-dev capabilities, not memory manipulation.
- id: "MP3"
path: "skills/RECONCILE.md"
reason: "Spec coverage table documenting dev-cluster features - no memory manipulation"

# PE3: Gap table mentioning kubeconfig as future architecture need, not credential access.
- id: "PE3"
path: "skills/RECONCILE.md"
reason: "Architecture gap table referencing kubeconfig as future work - no credential access"

# RA2: Writing a TUI keybinding config file - standard editor setup.
- id: "RA2"
path: "*opencode-setup/SKILL.md"
reason: "Writes tui.json keybinding config - standard editor setup, not session persistence"

# TM3: --tls-verify=false for OpenShift internal registry with self-signed certs
# on dev clusters - documented standard practice.
- id: "TM3"
path: "*deploy-cluster/SKILL.md"
reason: "OpenShift internal registry uses self-signed certs on dev clusters - documented practice"

# P1: Documentation describing kernel-level BPF capability, not an instruction override.
- id: "P1"
path: "*linux-capabilities/SKILL.md"
reason: "Reference documentation describing Linux capability behavior - not an agent instruction override"

# --- E2E test and CI false positives (not agent skills) ---

# E2: E2E test writes OIDC token from env into local openshell config (chmod 600).
- id: "E2"
path: "tests/e2e/e2e-openshell.sh"
reason: "E2E test harness - intentional OIDC token setup for openshell CLI, not env harvesting"

# PE3: E2E Kind driver acquires test credentials from local Keycloak.
- id: "PE3"
path: "tests/e2e/drivers/kind.sh"
reason: "E2E test harness - password grant against isolated Kind Keycloak with test credentials"

# TM2: CI installs upstream openshell CLI via documented install script.
- id: "TM2"
path: ".github/workflows/e2e.yml"
reason: "Accepted CI tradeoff - curl|sh installs OpenShell from upstream for e2e validation"

fingerprints: []
7 changes: 6 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ checks manually with `make check`.
- `components/control-plane/` - Go service, watches API server via gRPC and reconciles gateway resources into K8s
- `packages/gateway-management-ui/` - Private reusable React package containing canonical gateway management workflows
- `specs/` - Desired state of the system ([platform](specs/platform/), [standards](specs/standards/))
- `skills/` - Agent skills: [reconcile](skills/build/reconcile), [spec](skills/plan/spec), [full-stack-pipeline](skills/build/full-stack-pipeline), [dev-cluster](skills/build/dev-cluster), [review](skills/review/review-guidance), [amber-review](skills/review/amber-review), [ui-standards](skills/review/ui-standards), [tooling](skills/tooling/)
- `skills/` - Agent skills: [reconcile](skills/build/reconcile), [spec](skills/plan/spec), [full-stack-pipeline](skills/build/full-stack-pipeline), [dev-cluster](skills/build/dev-cluster), [review](skills/review/review-guidance), [amber-review](skills/review/amber-review), [ui-standards](skills/review/ui-standards), [tooling](skills/tooling/), [security-audit](skills/security/run-security-audit)
- `apm.yml` - APM manifest declaring upstream skill dependencies

## Key Files
Expand Down Expand Up @@ -72,6 +72,7 @@ Support skills available at any point:
- `/ui-standards` -- UI/UX audit or intent-driven design guidance
- `/align` -- convention health check
- `/maintain-ci` -- CI workflow and component registration maintenance
- `/run-security-audit` -- comprehensive security audit (threat model + code audit)
- `/memory` -- project memory management

## Commands
Expand Down Expand Up @@ -99,6 +100,10 @@ make kind-up # Start local Kind cluster
make kind-down # Destroy Kind cluster
make kind-status # Show cluster status
make lint # Lint all Go code

# APM & Security
make apm-install # Install APM dependencies + run security scan
make apm-audit # Run APM security audit
```

## Critical Conventions
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ help:
@echo " hooks-install Install Git hooks (lefthook)"
@echo " hooks-run Run hook checks manually"
@echo ""
@echo " APM"
@echo " apm-install Install APM dependencies + run security scan"
@echo " apm-install-force Install APM dependencies + require skillspector scan (CI)"
@echo " apm-audit Run APM security audit"
@echo ""

# ============================================================================
# Build targets
Expand Down Expand Up @@ -192,6 +197,21 @@ hooks-install:
hooks-run:
$(LEFTHOOK_CMD) run check

# ============================================================================
# APM
# ============================================================================

.PHONY: apm-install apm-install-force
apm-install:
@scripts/apm-install.sh

apm-install-force:
@scripts/apm-install.sh --force

.PHONY: apm-audit
apm-audit:
apm run audit

# ============================================================================
# Lint targets
# ============================================================================
Expand Down
Loading
Loading