📅 Day 129 — Testing, Linting, Type Checking, and Build Validation
🔄 Topic
Using validation commands to catch problems before deployment.
🎯 Goal
Understand how linting, type checking, tests, and builds reduce avoidable production mistakes.
🛠 What I Did
I reviewed the validation workflow for the Farina website. The project includes commands for linting, TypeScript checks, tests, build, sitemap sync, and image sync. These checks are not glamorous, but they are exactly what prevents small mistakes from becoming production problems. A professional workflow is not just writing code. It is proving the code still builds and behaves as expected.
Main areas covered:
- npm run lint
- npm run typecheck
- npm run test
- npm run build
- npm run sync:sitemap
- npm run sync:images
🔗 Key Cybersecurity Connections
Validation matters because attackers and outages both exploit mistakes. Broken builds, type errors, stale assets, and unreviewed changes all reduce reliability.
🔍 Investigation Questions
- Did linting catch unsafe patterns?
- Did type checking catch broken props or data shapes?
- Did tests pass?
- Did the production build complete?
- Did generated assets update correctly?
🚨 Detection Opportunities
Potential monitoring ideas:
- failed CI build
- unexpected test changes
- typecheck errors after dependency update
- build artifact missing files
- sitemap or image generation failure
Example:
project=farina-farm-website
change_type=public_website_update
risk_area=repository_deployment_or_public_input
triage=review_change_intent_and_validate_build
🧭 MITRE ATT&CK Techniques
Possible mappings depending on confirmed behavior:
- T1195 — Supply Chain Compromise
- T1565 — Data Manipulation
🗺 Visual Investigation Diagram
Code change
↓ Lint
↓ Typecheck
↓ Test
↓ Build
↓ Deploy decision
⚠ Challenges
The challenge was discipline. Skipping checks feels faster until it creates a broken deployment.
📚 What I Learned
I learned that validation commands are lightweight guardrails. They help make changes confidently without trusting memory.
➡ Next Steps
- Run checks before pushing
- Fix warnings instead of ignoring them
- Keep scripts documented
- Use CI to repeat validation
🧠 Reflection
This was useful because it turned a real project into security-aware learning without pretending that every task was a pure cybersecurity lab.
🧩 Lessons Learned
What worked
Thinking like an operator, not just a coder.
What broke
Treating validation as optional.
Why it broke
Optional checks are the first thing skipped under pressure.
Fix / takeaway
Make validation part of the normal workflow.
📈 Skill Progression Context
This supports cybersecurity progression because detection engineering also requires validation: test the rule, check false positives, document assumptions, and avoid blind trust.
😄 TL;DR
Professional work is checked work.
