chore: root commit of OWSAP security testing/tightening
This commit is contained in:
54
.gitea/workflows/security.yml
Normal file
54
.gitea/workflows/security.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Security Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
security-non-db:
|
||||
runs-on: vps-host
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.2.0
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: "npm"
|
||||
cache-dependency-path: api/package-lock.json
|
||||
|
||||
- name: Install API dependencies
|
||||
run: |
|
||||
cd api
|
||||
npm ci
|
||||
|
||||
- name: Run OWASP security suite (non-DB)
|
||||
run: |
|
||||
cd api
|
||||
SECURITY_DB_TESTS=0 npx vitest run -c vitest.security.config.ts
|
||||
|
||||
security-db:
|
||||
if: ${{ secrets.TEST_DATABASE_URL != '' }}
|
||||
runs-on: vps-host
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.2.0
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: "npm"
|
||||
cache-dependency-path: api/package-lock.json
|
||||
|
||||
- name: Install API dependencies
|
||||
run: |
|
||||
cd api
|
||||
npm ci
|
||||
|
||||
- name: Run OWASP security suite (DB-backed)
|
||||
env:
|
||||
TEST_DATABASE_URL: ${{ secrets.TEST_DATABASE_URL }}
|
||||
run: |
|
||||
cd api
|
||||
SECURITY_DB_TESTS=1 npx vitest run -c vitest.security.config.ts
|
||||
Reference in New Issue
Block a user