-
Notifications
You must be signed in to change notification settings - Fork 0
Harden QA, security, and release readiness #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 73 commits
Commits
Show all changes
81 commits
Select commit
Hold shift + click to select a range
b071072
chore: enforce formatting in CI
sepaseh bf8f541
chore: declare Node.js version
sepaseh df9381a
docs: add repository contribution policies
sepaseh 48cf147
refactor: centralize API error messages
sepaseh 4e71996
build: validate production environment
sepaseh 779452c
chore: enforce dependency security audit
sepaseh 9036ee0
chore: update dependencies and Node runtime
sepaseh 65e4486
chore: configure automated dependency updates
sepaseh 976f01b
ci: pin GitHub Actions to immutable revisions
sepaseh 70d7e22
ci: add CodeQL security scanning
sepaseh 73e3249
ci: integrate SonarQube analysis
sepaseh 48854d1
test: cover API authentication lifecycle
sepaseh 2a6412d
test: cover login journey end to end
sepaseh 97bbe62
docs: define SonarQube quality gate
sepaseh 7c609e7
docs: define main branch protection
sepaseh f0fd67e
test token handling
sepaseh 1715711
test storage utilities
sepaseh 138ce17
test routing permissions
sepaseh d0ed5c7
test API error handling
sepaseh ab7df50
test authentication refresh failures
sepaseh 0f94910
test priority forms and pages
sepaseh 67f533b
test authentication journeys
sepaseh 2af82cf
test role and user management
sepaseh d384755
test application accessibility
sepaseh a6198b5
test localized critical journeys
sepaseh bf20247
test cross-browser coverage
sepaseh 897579b
test add visual regression coverage
sepaseh 63b0a07
perf split application bundle
sepaseh b1a6492
perf enforce performance budgets
sepaseh 42889e9
security enforce production headers
sepaseh aa73007
test add deployment smoke checks
sepaseh 8c1d023
feat add structured observability
sepaseh c719881
chore: establish automated releases
sepaseh a6605ea
docs: define release rollback procedures
sepaseh b1ab9e0
test: add staging validation gate
sepaseh c8aa8a6
security: add threat modeling and DAST
sepaseh 7d94379
test: add mutation and API contract gates
sepaseh cb50735
style: bundle local Vazirmatn font
sepaseh fc68a9d
ci: require SonarQube quality gate configuration
sepaseh d5e2f99
test: isolate Vitest environment configuration
sepaseh 5193ab8
test: raise production coverage baseline
sepaseh 783adc6
fix: prevent email redaction regex backtracking
sepaseh f474eea
fix: prevent query redaction regex backtracking
sepaseh faa13a9
fix: validate untrusted API error responses
sepaseh e058e3a
refactor: reduce API interceptor complexity
sepaseh f536c9f
refactor: normalize error boundary render type
sepaseh f3c31e5
refactor: sanitize OTP input props
sepaseh 5e7063a
refactor: normalize route wrapper return type
sepaseh 546d197
refactor: remove redundant permission type alias
sepaseh 0b1f086
test: centralize synthetic E2E credentials
sepaseh deab43e
fix: configure SonarQube organization
sepaseh 7bb1207
fix: satisfy Sonar quality analysis
sepaseh abb2e93
test: raise coverage for routing and observability
sepaseh 1f4ec49
test: fix performance entry mock type
sepaseh ec3d23b
ci: stabilize Lighthouse first paint budget
sepaseh 6db617e
fix(ci): skip SonarQube for fork pull requests
sepaseh e0055f0
fix(ci): pin ZAP image digest
sepaseh 547f67b
ci: account for Lighthouse runner variance
sepaseh 86660f8
fix(ci): disable staging checkout credentials
sepaseh fcdbf62
test(contract): require account authorization
sepaseh 2f456fd
docs: correct required check contexts
sepaseh e1f60fc
docs: align referrer policy description
sepaseh d851308
fix: align Node.js engine support
sepaseh bf730f1
docs(security): complete authentication review record
sepaseh cc7e47f
fix(security): restrict DAST to staging
sepaseh ea29331
fix(performance): respect application base path
sepaseh e490cb0
fix(a11y): preserve required OTP semantics
sepaseh fb15b22
fix(styles): unquote Vazirmatn family name
sepaseh 9d5a36b
test: document ResizeObserver no-ops
sepaseh 31787e5
fix(types): include staging and contract configs
sepaseh 05c2a8d
fix(ci): disable checkout credential persistence
sepaseh fcfe9d3
fix: resolve SonarCloud maintainability issues
sepaseh 92c59b2
refactor source modules into colocated directories
sepaseh 0d8599b
fix: satisfy Sonar quality gate
sepaseh 65a02b1
test: stabilize account flow coverage
sepaseh 57efb16
test: cover management actions
sepaseh 0545854
test: allow CI time for user management flow
sepaseh 07331aa
test: align management fixtures with API types
sepaseh 42cb9bd
fix: remove invalid OTP aria attribute
sepaseh 6fd17ab
fix: remove redundant password fields fragment
sepaseh b2255f7
fix remaining coderabbit findings
sepaseh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| VITE_API_BASE_URL=https://localhost:8080 | ||
| VITE_APP_BASE_URL=/ | ||
| VITE_OBSERVABILITY_URL=https://observability.example.com/events | ||
| VITE_RELEASE_ID=local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| VITE_API_BASE_URL=http://localhost | ||
| VITE_APP_BASE_URL=/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| * text=auto | ||
|
|
||
| *.css text eol=lf | ||
| *.html text eol=lf | ||
| *.js text eol=lf | ||
| *.json text eol=lf | ||
| *.md text eol=lf | ||
| *.ts text eol=lf | ||
| *.tsx text eol=lf | ||
| *.yml text eol=lf | ||
| *.yaml text eol=lf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Default reviewer for all repository changes. | ||
| * @sepaseh | ||
|
|
||
| # Require explicit review for automation and dependency policy changes. | ||
| /.github/ @sepaseh | ||
| /package.json @sepaseh | ||
| /package-lock.json @sepaseh | ||
|
|
||
| # Release policy, version state, and generated release notes. | ||
| /.release-please-manifest.json @sepaseh | ||
| /CHANGELOG.md @sepaseh | ||
| /docs/release-operations.md @sepaseh | ||
| /docs/releasing.md @sepaseh | ||
| /release-please-config.json @sepaseh | ||
|
|
||
| # Production-like staging gate. | ||
| /.github/workflows/staging.yml @sepaseh | ||
| /docs/staging.md @sepaseh | ||
| /staging.config.ts @sepaseh | ||
| /staging/ @sepaseh | ||
|
|
||
| # Security model, review evidence, and active scanning. | ||
| /.github/workflows/dast.yml @sepaseh | ||
| /docs/security/ @sepaseh | ||
| /SECURITY.md @sepaseh | ||
|
|
||
| # Test-effectiveness and frontend/backend compatibility gates. | ||
| /.github/workflows/mutation.yml @sepaseh | ||
| /contract/ @sepaseh | ||
| /docs/contract-testing.md @sepaseh | ||
| /stryker.config.json @sepaseh | ||
| /vitest.contract.config.ts @sepaseh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| version: 2 | ||
|
|
||
| updates: | ||
| - package-ecosystem: npm | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
| day: monday | ||
| time: "09:00" | ||
| timezone: Asia/Tehran | ||
| open-pull-requests-limit: 10 | ||
| reviewers: | ||
| - sepaseh | ||
| commit-message: | ||
| prefix: chore | ||
| include: scope | ||
| groups: | ||
| production-minor-and-patch: | ||
| dependency-type: production | ||
| update-types: | ||
| - minor | ||
| - patch | ||
| development-minor-and-patch: | ||
| dependency-type: development | ||
| update-types: | ||
| - minor | ||
| - patch | ||
|
|
||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
| day: monday | ||
| time: "09:00" | ||
| timezone: Asia/Tehran | ||
| open-pull-requests-limit: 5 | ||
| reviewers: | ||
| - sepaseh | ||
| commit-message: | ||
| prefix: chore | ||
| include: scope | ||
| groups: | ||
| actions-minor-and-patch: | ||
| patterns: | ||
| - "*" | ||
| update-types: | ||
| - minor | ||
| - patch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: CodeQL | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| schedule: | ||
| - cron: "30 3 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze JavaScript and TypeScript | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | ||
|
|
||
| - uses: github/codeql-action/init@f52b05f4acaaa234e44466e66d29050e135ea9ef # v4.36.0 | ||
| with: | ||
| languages: javascript-typescript | ||
| queries: security-extended | ||
|
|
||
| - uses: github/codeql-action/analyze@f52b05f4acaaa234e44466e66d29050e135ea9ef # v4.36.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: DAST | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 3 1 * *" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| cancel-in-progress: false | ||
| group: staging-dast | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| zap: | ||
| environment: staging | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| env: | ||
| DAST_ALLOWED_HOST: ${{ vars.STAGING_ALLOWED_HOST }} | ||
| DAST_PRODUCTION_HOST: ${{ vars.PRODUCTION_HOST }} | ||
| DAST_TARGET: ${{ vars.STAGING_BASE_URL }} | ||
|
|
||
| steps: | ||
| - name: Validate authorized target | ||
| shell: bash | ||
| run: | | ||
| node -e ' | ||
| const value = process.env.DAST_TARGET; | ||
| const allowedHost = process.env.DAST_ALLOWED_HOST?.toLowerCase(); | ||
| const productionHost = process.env.DAST_PRODUCTION_HOST?.toLowerCase(); | ||
| if (!value) throw new Error("STAGING_BASE_URL is required"); | ||
| if (!allowedHost) throw new Error("STAGING_ALLOWED_HOST is required"); | ||
| if (!productionHost) throw new Error("PRODUCTION_HOST is required"); | ||
| const url = new URL(value); | ||
| if (url.protocol !== "https:") { | ||
| throw new Error("STAGING_BASE_URL must use HTTPS"); | ||
| } | ||
| if (url.username || url.password) { | ||
| throw new Error("STAGING_BASE_URL must not contain credentials"); | ||
| } | ||
| if (url.hostname.toLowerCase() !== allowedHost) { | ||
| throw new Error("STAGING_BASE_URL host is not explicitly allowed"); | ||
| } | ||
| if (url.hostname.toLowerCase() === productionHost) { | ||
| throw new Error("DAST must not target the production host"); | ||
| } | ||
| ' | ||
|
|
||
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | ||
|
|
||
| - name: Run authorized ZAP full scan | ||
| uses: zaproxy/action-full-scan@bee4e5be916301228d2b1b2dcad73aab6fa6a25b # v0.13.0 | ||
| with: | ||
| allow_issue_writing: false | ||
| artifact_name: staging-dast-${{ github.run_id }} | ||
| cmd_options: "-a" | ||
| docker_name: ghcr.io/zaproxy/zaproxy:2.17.0@sha256:c558ee87358911ab17278c70991e856f57793e115d9cd0f88ca475cf82907a1a | ||
| fail_action: true | ||
| target: ${{ env.DAST_TARGET }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.