Commit Graph

8 Commits

Author SHA1 Message Date
google-labs-jules[bot]
4191e829cb feat(security): enhance input sanitization and domain blocking
- Update `sanitizeInput` in `src/utils/security.ts` to escape backticks (`) to ``` preventing potential JS template literal injection.
- Add common disposable email domains (e.g., sharklasers.com, dispostable.com) to `BLOCKED_DOMAINS` in `src/utils/security.ts`.
- Update tests in `src/utils/security.test.ts` to verify new security measures.
- Record security learning in `.jules/sentinel.md`.

Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
2026-02-01 01:55:26 +00:00
google-labs-jules[bot]
c9877db3bb feat(security): add blocked domains and strict TLD validation
- Adds `BLOCKED_DOMAINS` list to reject disposable/invalid email domains.
- Enforces TLD length >= 2 chars in `isValidEmail`.
- Updates tests to cover new validation rules.

Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
2026-01-30 04:56:33 +00:00
google-labs-jules[bot]
15c4b88535 feat(security): enhance email validation and sanitization
- Updates `isValidEmail` to strictly reject double quotes and backticks while allowing apostrophes.
- Applies `sanitizeInput` to email fields in Contact form payload (Defense in Depth).
- Adds tests for email validation edge cases.
- Updates Sentinel journal.

Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
2026-01-30 01:48:47 +00:00
google-labs-jules[bot]
57f7c5667f 🛡️ Sentinel: [HIGH] Implement strict email validation
- Implemented `isValidEmail` utility with strict regex validation (rejects `<` and `>`) to prevent XSS vectors.
- Updated `Contact.tsx` to use `isValidEmail` instead of weak regex.
- Added comprehensive tests for `isValidEmail` in `src/utils/security.test.ts`.
- Fixed flaky test in `src/pages/__tests__/Contact.test.tsx` by clearing `localStorage` in `afterEach`.
- Added test case for invalid email submission.
- Documented findings in `.jules/sentinel.md`.

Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
2026-01-27 01:56:08 +00:00
google-labs-jules[bot]
839e1bf82f feat: add client-side rate limiting to contact form
- Added `useRateLimit` hook
- Integrated hook into `Contact.tsx`
- Added translations for rate limit error
- Added unit tests
- Fixed type error in `Button.tsx` to allow build to pass
2026-01-26 01:49:05 +00:00
google-labs-jules[bot]
5f7f422167 🛡️ Sentinel: [HIGH] Add security headers to firebase.json
Added strict security headers to `firebase.json` for Firebase Hosting.
Headers included:
- X-Content-Type-Options: nosniff
- X-Frame-Options: DENY
- Referrer-Policy: strict-origin-when-cross-origin
- Content-Security-Policy: Includes directives for 'self', Google Fonts, EmailJS, and disallows object/frame embedding.

Also initialized `.jules/sentinel.md` with the first security learning.
2026-01-25 01:35:53 +00:00
Melvin Ragusa
b80db420c2 jules: merged .jules and .Jules directories 2026-01-24 11:50:38 +01:00
google-labs-jules[bot]
6801682c2e Shield: Add input sanitization and length validation to Contact form
Added `sanitizeInput` utility to escape HTML characters.
Updated `Contact.tsx` to sanitize inputs before sending via `emailjs`.
Added max length validation for Name (100), Subject (200), and Message (5000).
Updated tests to cover sanitization and validation logic, including adding `cleanup()` to prevent test leakage.
2026-01-24 10:05:33 +00:00