Courses / HEC NSCT – National Skill Competency Test: Complete Preparation for Computing Graduates

6.5 Web Security, Performance and Deployment

Area 6 – Web Development (10%) · 45 min read · 12 MCQs to check yourself

Top web vulnerabilities (OWASP)

Attack What happens Defence
SQL injection Malicious SQL in input Prepared statements / ORM
XSS (cross-site scripting) Attacker's script runs in other users' browsers Escape output, Content Security Policy, avoid innerHTML with user data
CSRF (cross-site request forgery) A logged-in user is tricked into sending a request CSRF tokens, SameSite cookies
Broken authentication Weak passwords, stolen sessions Hash passwords (bcrypt), MFA, secure HttpOnly cookies
Broken access control Users reach others' data (change the id in a URL) Check authorization on the server for every request
Sensitive data exposure Data sent in plain text HTTPS/TLS everywhere, encryption at rest
Never trust the client – always validate on the server too.

Performance

Minify and bundle JS/CSS, compress images (WebP), lazy loading, caching (browser cache, CDN), fewer requests, code splitting. Measure with Lighthouse (Core Web Vitals).

Deployment

Hosting: shared hosting, VPS, cloud (AWS, Azure, GCP), PaaS (Vercel, Netlify, Heroku). Domain + DNS records (A, CNAME). SSL/TLS certificate (Let's Encrypt). CI/CD pipelines; Docker containers; environment variables for secrets (never commit keys to Git). Testing tools: Jest, Cypress, Selenium. Progressive Web Apps (PWA) work offline using service workers. Accessibility (WCAG): alt text, keyboard navigation, contrast.

OWASP Top 10 web application security risks (Telusko)

This lesson ends with a quiz of 12 MCQs. Open the lesson on PrepOasis to take it and save your progress.

Previous: 6.4 Frameworks, Back-End and REST APIs · Next: Area 6 Review, Checklist and Area Test

All lessons in HEC NSCT – National Skill Competency Test: Complete Preparation for Computing Graduates