resume/.cursor/rules/js-css-standards.mdc

16 lines
657 B
Plaintext

# JavaScript and CSS Standards
## Security Requirements
- All JS and CSS files must be hashed for integrity checks
- Hashes must be updated in both HTML and Caddyfile CSP headers
- Use `shasum -a 256` followed by base64 encoding for hash generation
## File References
- JavaScript files should be referenced in HTML with integrity attributes
- CSS files should be referenced with integrity attributes
- The CSP in [docker/resume/Caddyfile](mdc:docker/resume/Caddyfile) must include these hashes
## Automation
- Run `docker/resume/update-csp-hashes.sh` after modifying any JS or CSS file
- Verify hashes match between HTML and Caddyfile before deployment