Commit Graph

2 Commits

Author SHA1 Message Date
ANGX 2c99466fa8 style: Fix line endings and minor code improvements
- Normalize line endings for GitHub files (LF to CRLF on Windows)
- Change let to const for immutable variables (codegen, parser)
- Remove unnecessary Boolean() casts in runtime
- Improve code quality per ESLint suggestions

All changes are non-functional - no behavior changes
2026-01-18 17:15:26 +01:00
ANGX a0ce66f36e security: Comprehensive repository hardening
Add multi-layered security measures to protect against common threats:

## Code Review & Access Control
- Add CODEOWNERS file for mandatory reviews on critical files
  * Security policies and workflows
  * Governance and compliance documents
  * Core compiler components (lexer, parser, semantic, codegen, runtime)
  * Registry system and CLI commands
  * Build and deployment configurations

## Issue & PR Management
- Add structured issue templates (bug report, feature request, security)
- Add comprehensive PR template with security checklist
- Configure issue template routing and contact links
- Private vulnerability reporting guidance

## Secret & Credential Protection
- Add Gitleaks configuration (.gitleaks.toml)
  * Custom rules for PCL-specific patterns
  * Generic secret detection (API keys, tokens, passwords)
  * Private key detection
  * Allowlist for false positives
- Enhanced .gitignore for sensitive files
  * API keys and credentials (*.pem, *.key, secrets.json)
  * Cloud provider configs (AWS, Azure, GCP)
  * SSH keys and certificates
  * Environment-specific secrets

## Security Automation
- Add security npm scripts to package.json
  * security:audit - npm audit with moderate level
  * security:audit:fix - automatic vulnerability fixes
  * security:secrets - gitleaks scanning helper
  * security:licenses - license compliance check
  * security:scan - comprehensive security check

## Documentation & Guidance
- Add SECURITY_CHECKLIST.md for contributors
  * Pre-commit security checks
  * Code review security guidelines
  * Incident response procedures
  * Security best practices with code examples
- Add docs/SECURITY_HARDENING.md
  * Complete security architecture overview
  * Tool usage instructions
  * Security metrics and SLAs
  * Vulnerability reporting process

## Security Features Added
✅ CODEOWNERS for mandatory reviews
✅ Issue/PR templates with security focus
✅ Gitleaks configuration for secret scanning
✅ Enhanced .gitignore for sensitive files
✅ Security automation scripts
✅ Comprehensive security documentation
✅ Security badges in README

## Defense-in-Depth Layers
1. Repository Security: CODEOWNERS, branch protection guidance
2. Dependency Security: Dependabot + npm audit automation
3. Secret Scanning: Gitleaks with custom rules
4. Automated Scanning: GitHub Actions security workflow
5. Secure Coding: Templates, checklists, documentation

Ref: SECURITY.md, PCL_SECURITY_MODEL.md, OWASP Top 10
2026-01-18 15:36:19 +01:00