Skip to content

Add JS/TS/Node security-hardening guidance to issue execution#353

Merged
nicobistolfi merged 1 commit intomainfrom
vigilante/issue-352-add-js-ts-node-security-hardening-guidance-to-vigilante-issue-execution
Apr 1, 2026
Merged

Add JS/TS/Node security-hardening guidance to issue execution#353
nicobistolfi merged 1 commit intomainfrom
vigilante/issue-352-add-js-ts-node-security-hardening-guidance-to-vigilante-issue-execution

Conversation

@nicobistolfi
Copy link
Copy Markdown
Collaborator

Summary

  • Adds stack-aware security guidance to Vigilante prompt assembly for JavaScript, TypeScript, and Node.js repositories
  • Extends repository classification with TechStack detection and Node.js-specific ProcessHints (package managers, lockfiles, TypeScript configs)
  • Creates internal/skill/security.go with curated, concise guidance covering dependency/supply-chain, package-manager hardening (npm/pnpm/yarn), runtime secure-coding, TypeScript safety, CI/CD secrets, static analysis, and monorepo concerns
  • Non-JS repositories receive no JS-specific security guidance
  • Guidance adapts to detected ecosystem signals (e.g., pnpm-only repos get pnpm hardening, monorepos get workspace boundary guidance)
  • Existing prompt and skill policies (vigilante commit, issue comments, validation) remain intact

Validation

  • go test ./... — all packages pass
  • gofmt -l . — no formatting issues
  • go vet ./... — no vet warnings
  • go build ./... — builds cleanly
  • New tests cover: Node.js detection for npm/pnpm/yarn, TypeScript detection, default fallback to npm, non-Node repos excluded, monorepo repos get monorepo guidance, traditional repos don't, prompt assembly integration for Node.js and non-Node repos

Test plan

  • Verify JS/TS/Node repos receive security guidance in generated prompts
  • Verify non-JS repos (Go, Gradle, etc.) do not receive JS-specific guidance
  • Verify guidance adapts to detected package manager (npm, pnpm, yarn)
  • Verify TypeScript guidance is conditional on tsconfig detection
  • Verify monorepo security guidance is conditional on monorepo shape
  • Verify repo classification JSON includes tech_stacks and node hints
  • Verify existing prompt tests continue to pass unchanged

Closes #352

Introduce stack-aware security guidance that Vigilante conditionally
injects into coding-agent prompts for JavaScript, TypeScript, and
Node.js repositories. Non-JS repos remain unaffected.

- Add TechStack type and Node.js detection to repo classification
  based on package.json, lockfiles, tsconfig, and package manager
- Create security.go with curated guidance covering dependency/
  supply-chain, package-manager hardening, runtime secure-coding,
  TypeScript safety, CI/CD secrets, static analysis, and monorepo
  concerns
- Integrate guidance into BuildIssuePromptForRuntime so detected
  JS/TS/Node repos receive it; guidance adapts to detected package
  manager (npm/pnpm/yarn), TypeScript presence, and monorepo shape
- Include tech_stacks and node hints in repo classification JSON
- Add comprehensive tests for detection, guidance content, and
  prompt assembly integration
@nicobistolfi nicobistolfi merged commit fd65c1c into main Apr 1, 2026
1 check passed
@nicobistolfi nicobistolfi deleted the vigilante/issue-352-add-js-ts-node-security-hardening-guidance-to-vigilante-issue-execution branch April 1, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add JS/TS/Node security-hardening guidance to Vigilante issue execution

1 participant