Skip to content

Commit eec93d8

Browse files
committed
Phase1: Add project proposal, security plan, README and changelog
1 parent 77b524d commit eec93d8

File tree

4 files changed

+118
-0
lines changed

4 files changed

+118
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# CHANGELOG
2+
3+
## Unreleased
4+
5+
* Phase1: Add project proposal and security plan (by Munazza Ahmed Sumaiya Bukhari Zainab Altaf)
6+

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# SecureNotes (fork of full-stack-fastapi-postgresql)
2+
3+
Phase 1 deliverables for SecureNotes (REST API security project).
4+
5+
## Phase 1 contents
6+
7+
* `docs/PROJECT_PROPOSAL.md`
8+
* `docs/SECURITY_PLAN.md`
9+
* `docs/system_overview.drawio` / `.png` / `.pdf`
10+
* `README.md`, `CHANGELOG.md`
11+
12+
This repo is a fork of the `tiangolo/full-stack-fastapi-postgresql` starter.
113
# Full Stack FastAPI Template
214

315
<a href="https://github.com/fastapi/full-stack-fastapi-template/actions?query=workflow%3ATest" target="_blank"><img src="https://github.com/fastapi/full-stack-fastapi-template/workflows/Test/badge.svg" alt="Test"></a>

docs/PROJECT_PROPOSAL.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Project Proposal — SecureNotes (FastAPI)
2+
3+
**Course:** Secure Software Development
4+
**Project Theme:** REST API Security (FastAPI) — fork of tiangolo/full-stack-fastapi-postgresql
5+
**Repository (fork):** [https://github.com/YourGitHubUser/secure-notes](https://github.com/YourGitHubUser/secure-notes)
6+
7+
**Implementer (Phase 1):** [Your Full Name]
8+
9+
## Objective
10+
11+
Build a secure REST API to accept, encrypt, store and return user notes. Use Secure SDLC, OWASP guidance, and DevSecOps: threat modeling, code and dependency scanning, container scanning, and DAST.
12+
13+
## Scope (Phase 1)
14+
15+
* Fork the template and set up repo branch `phase1-setup`.
16+
* Define security objectives and produce a Security Plan (this doc + SECURITY_PLAN.md).
17+
* Produce Level-0 DFD (docs/system_overview.*).
18+
* Setup initial README and changelog.
19+
20+
## Deliverables (Phase 1)
21+
22+
* docs/PROJECT_PROPOSAL.md
23+
* docs/SECURITY_PLAN.md
24+
* docs/system_overview.png and .pdf
25+
* README.md and CHANGELOG.md
26+
* Branch: phase1-setup and PR to main
27+
28+
## Team & responsibilities
29+
30+
* [Your Full Name] — Phase 1: planning, repo setup, DFD, documentation.
31+
* (Teammates will implement later phases: threat modeling, code, tests).
32+
33+
## Timeline
34+
35+
* Phase 1: (today) Planning & Setup
36+
* Phase 2: Threat Model & Risk Assessment
37+
* Phase 3: Implementation (backend security controls)
38+
* Phase 4: CI/CD & automated security scans
39+
* Phase 5: Final report & demo

docs/SECURITY_PLAN.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Security Plan — SecureNotes (Phase 1)
2+
3+
**Author:** [Your Full Name]
4+
**Repo:** [https://github.com/YourGitHubUser/secure-notes](https://github.com/YourGitHubUser/secure-notes)
5+
**Date:** YYYY-MM-DD
6+
7+
## 1. Summary
8+
9+
This plan defines security objectives, assets, roles, high-level controls, and next steps for Phase 1 of SecureNotes (FastAPI).
10+
11+
## 2. Security Objectives (CIA + Privacy)
12+
13+
* **Confidentiality**: Encrypt note bodies at rest using AES-GCM with a 256-bit application master key.
14+
* **Integrity**: Use JWT with HMAC (HS256) and short token lifetimes; authenticated encryption for stored data.
15+
* **Availability**: Basic rate limiting plan and graceful error handling (to be implemented).
16+
* **Privacy**: Minimize PII; store username and password hash only; redact sensitive logs.
17+
18+
## 3. System Assets
19+
20+
| Asset | Classification | Comments |
21+
| -------------------------- | ---------------: | -------------------------------------- |
22+
| Note content | Sensitive | Must be encrypted at rest |
23+
| User credentials | Highly sensitive | Store hashed (bcrypt) only |
24+
| MASTER_KEY / JWT_SECRET | Secret | Store in GitHub Secrets/secret manager |
25+
| Database backups | Sensitive | Encrypt & restrict access |
26+
| CI tokens & registry creds | Secret | Least privilege in CI |
27+
28+
## 4. Users & Roles
29+
30+
* **User**: create/read own notes.
31+
* **Admin** (future): manage users and system.
32+
* **Developer/CI**: builds and tests; must not leak secrets.
33+
34+
## 5. Data Flows (high level)
35+
36+
* User → HTTPS → FastAPI endpoints (register, login, /notes)
37+
* FastAPI → encrypt note → DB (store ciphertext)
38+
* CI (GitHub Actions) → build/test/scan → images/reports
39+
40+
A Level-0 DFD diagram is included: `docs/system_overview.png` / `.pdf`.
41+
42+
## 6. Initial Controls to implement (Phase 2/3 plan)
43+
44+
1. Password hashing (bcrypt via passlib).
45+
2. JWT auth (short lived access tokens).
46+
3. AES-GCM encryption for note bodies (app master key from secrets).
47+
4. Pydantic input validation for all endpoints.
48+
5. Security headers middleware (CSP, HSTS, X-Frame-Options).
49+
6. CI: CodeQL, Snyk (SCA), Trivy (container), OWASP ZAP (DAST).
50+
51+
## 7. Key risks & mitigations
52+
53+
* **Leak of master key** → use GitHub Secrets & rotation plan.
54+
* **Dependency vulnerabilities** → Snyk scans and upgrades.
55+
* **Misconfigured CI secrets** → restrict access & do not echo secrets in logs.
56+
57+
## 8. Phase-1 acceptance criteria
58+
59+
* Repo forked and branch `phase1-setup` created.
60+
* Security Plan and DFD added to `docs/`.
61+
* PR created (and merged).

0 commit comments

Comments
 (0)