Commit Graph

2 Commits

Author SHA1 Message Date
Daniel Avila 0e06493dbe security: Harden CI/CD and repo for open-source safety (#458)
* enhance: Improve prompt-engineer agent (automated review)

- Fix broken reasoning framework: complete Ordering field and Necessity scale
- Remove OpenAI attribution from description; add invocation example block
- Restrict tools to Read only (text-transformation agent needs no writes)
- Add XML Structure and CoT Opportunity dimensions to reasoning template
- Move meta-instruction NOTE out of output template, place as agent directive
- Fix stray markdown bold markers on Reasoning Before Conclusions guideline
- Integrate orphaned examples bullet into the Examples guideline line
- Add concrete worked example section (classify customer feedback)

Automated review cycle | Co-Authored-By: Claude Code <noreply@anthropic.com>

* security: Harden CI/CD and repo for open-source safety

- Add --ignore-scripts to all npm ci/install in CI workflows and predeploy script
- Fix shell injection in discord-release-notification (use env vars + jq for payload)
- Add explicit permissions to all workflows (least privilege principle)
- Add root .npmrc with ignore-scripts=true
- Add .github/dependabot.yml for automated dependency security updates
- Add .github/CODEOWNERS to protect workflows, scripts, and API paths
- Expand .gitignore with *.pem, *.key, credentials.json patterns

* fix: Grant contents:read to deploy workflow so checkout works

Cubic correctly flagged that permissions: {} blocks actions/checkout.
2026-03-26 19:19:39 -04:00
Dani 598aac0e6b test: Add comprehensive API testing and deployment documentation
Critical Infrastructure Protection:
- Comprehensive test suite for all API endpoints
- Pre-deployment validation script
- Detailed API architecture documentation in CLAUDE.md

Test Suite (__tests__/endpoints.test.js):
- Critical endpoint availability checks
- Component download tracking validation
- Discord bot integration tests
- Claude Code changelog monitor tests
- Security & CORS validation
- Response time validation

Pre-Deployment Script (scripts/predeploy-check.sh):
- Git status validation
- Node.js & npm version checks
- Automatic dependency installation
- API test execution
- File structure validation
- Environment variable checklist
- Vercel configuration validation

Documentation Updates:
- API Architecture & Deployment section in CLAUDE.md
- Endpoint specifications and usage
- Testing procedures
- Deployment workflow
- Troubleshooting guides
- Emergency rollback procedures
- api/README.md with quick reference

This ensures the critical /api/track-download-supabase endpoint
(used by ALL component installations) never breaks during deployments.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 14:22:13 -04:00