mirror of
https://github.com/Cacti/cacti.git
synced 2026-10-29 08:06:58 +09:00
* fix(auth): reject malformed remember cookies Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * test: load cookie contracts lazily * test(cookie): fail clearly when contract markers move Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * fix(auth): align persistent credential lifecycle Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * test(auth): find cookie function boundaries robustly Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> --------- Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> Co-authored-by: TheWitness <thewitness@cacti.net>
106 lines
3.1 KiB
YAML
106 lines
3.1 KiB
YAML
name: Cookie Coverage
|
|
|
|
on:
|
|
push:
|
|
branches: [develop]
|
|
paths:
|
|
- '.github/workflows/cookie-coverage.yml'
|
|
- 'auth_2fa.php'
|
|
- 'auth_changepassword.php'
|
|
- 'auth_login.php'
|
|
- 'composer.json'
|
|
- 'composer.lock'
|
|
- 'include/auth.php'
|
|
- 'include/global.php'
|
|
- 'include/js/jquery.zoom.js'
|
|
- 'include/js/js.storage.js'
|
|
- 'include/layout.js'
|
|
- 'include/themes/midwinter/main.js'
|
|
- 'lib/auth.php'
|
|
- 'lib/functions.php'
|
|
- 'logout.php'
|
|
- 'package.json'
|
|
- 'package-lock.json'
|
|
- 'tests/Helpers/AuthCookieProbe.php'
|
|
- 'tests/integration/AuthSystemRegressionIntegrationTest.php'
|
|
- 'tests/js/cookie_helpers.test.js'
|
|
- 'tests/Unit/Security/Session/CookiePolicyContractTest.php'
|
|
- 'tests/Unit/Security/Session/CookieRuntimeTest.php'
|
|
pull_request:
|
|
branches: [develop]
|
|
paths:
|
|
- '.github/workflows/cookie-coverage.yml'
|
|
- 'auth_2fa.php'
|
|
- 'auth_changepassword.php'
|
|
- 'auth_login.php'
|
|
- 'composer.json'
|
|
- 'composer.lock'
|
|
- 'include/auth.php'
|
|
- 'include/global.php'
|
|
- 'include/js/jquery.zoom.js'
|
|
- 'include/js/js.storage.js'
|
|
- 'include/layout.js'
|
|
- 'include/themes/midwinter/main.js'
|
|
- 'lib/auth.php'
|
|
- 'lib/functions.php'
|
|
- 'logout.php'
|
|
- 'package.json'
|
|
- 'package-lock.json'
|
|
- 'tests/Helpers/AuthCookieProbe.php'
|
|
- 'tests/integration/AuthSystemRegressionIntegrationTest.php'
|
|
- 'tests/js/cookie_helpers.test.js'
|
|
- 'tests/Unit/Security/Session/CookiePolicyContractTest.php'
|
|
- 'tests/Unit/Security/Session/CookieRuntimeTest.php'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: cookie-coverage-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
COMPOSER_ALLOW_SUPERUSER: 1
|
|
|
|
jobs:
|
|
coverage:
|
|
name: Cookie behavior matrix
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup PHP 8.4
|
|
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
|
|
with:
|
|
php-version: '8.4'
|
|
coverage: none
|
|
extensions: intl, mysql, gd, ldap, gmp, xml, curl, json, mbstring
|
|
|
|
- name: Setup Node 22
|
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # 4.4.0
|
|
with:
|
|
node-version: '22'
|
|
cache: npm
|
|
|
|
- name: Install PHP dependencies
|
|
run: composer install --prefer-dist --no-progress --no-interaction
|
|
|
|
- name: Install JavaScript dependencies
|
|
run: npm ci
|
|
|
|
- name: Run PHP cookie matrix
|
|
run: >-
|
|
include/vendor/bin/pest
|
|
tests/Unit/Security/Session/CookiePolicyContractTest.php
|
|
tests/Unit/Security/Session/CookieRuntimeTest.php
|
|
tests/integration/AuthSystemRegressionIntegrationTest.php
|
|
|
|
- name: Run browser cookie helpers
|
|
run: node --test tests/js/cookie_helpers.test.js
|