mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 01:35:22 +02:00
Run tests behind logged in pages (#162)
* Redirect admin login to Login.gov * Add logged in scanning to CI * Fix bug in LOGIN_URL * Fix linter and tests * Address PR feedback * Try quotes
This commit is contained in:
parent
f130ffc9a8
commit
9b008d6363
11 changed files with 101 additions and 11 deletions
20
.github/workflows/security-check.yaml
vendored
20
.github/workflows/security-check.yaml
vendored
|
@ -35,6 +35,17 @@ jobs:
|
|||
name: security-check-output
|
||||
path: ./src/output.txt
|
||||
|
||||
backdoor-check:
|
||||
name: Ensure custom mods are contained
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
- name: MockUserLogin should not be in settings.MIDDLEWARE
|
||||
run: "! grep -rwn * --exclude-dir=node_modules -e registrar.tests.common.MockUserLogin"
|
||||
working-directory: ./src
|
||||
|
||||
owasp-scan:
|
||||
name: OWASP security scan
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -42,6 +53,15 @@ jobs:
|
|||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Disable Login
|
||||
# by adding MockUserLogin to settings.MIDDLEWARE
|
||||
run: |
|
||||
perl -pi \
|
||||
-e 's/"csp.middleware.CSPMiddleware",/$&"registrar.tests.common.MockUserLogin",/' \
|
||||
src/registrar/config/settings.py
|
||||
working-directory: ./src
|
||||
|
||||
- name: OWASP scan
|
||||
run: docker compose run owasp
|
||||
working-directory: ./src
|
||||
|
|
8
.github/workflows/test.yaml
vendored
8
.github/workflows/test.yaml
vendored
|
@ -35,6 +35,14 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Disable Login
|
||||
working-directory: ./src
|
||||
# by adding MockUserLogin to settings.MIDDLEWARE
|
||||
run: |
|
||||
perl -pi \
|
||||
-e 's/"csp.middleware.CSPMiddleware",/$&"registrar.tests.common.MockUserLogin",/' \
|
||||
src/registrar/config/settings.py
|
||||
|
||||
- name: Accessibility Scan
|
||||
working-directory: ./src
|
||||
# leverage the docker compose setup that we already have for local development
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue