Skip to content

Commit

Permalink
3.8.2 Security Release (#284)
Browse files Browse the repository at this point in the history
* Feature/travis ci to GitHub actions (#282)

* Updates Composer/NPM Dependencies & Adds New GitHub Actions

* Moves All CI/CI Functionality to GitHub Actions

- Updates Composer & NPM dependencies to newer versions.
- Updates default development environment WordPress version to 5.6.x.
- Fixes missing updated to the language POT file.
- Moves to using a GitHub Release for WordPress.org deployment.
- Removes TravisCI configuration.

* Fixes Login Page XSS Issue (#283)

- Adds escaping to the errot output message.
- Adds escaping to the login button output.

* Patch Version Bump & Changelog Updates for Release
  • Loading branch information
timnolte authored Mar 24, 2021
1 parent 3a300e9 commit 14dbc06
Show file tree
Hide file tree
Showing 21 changed files with 4,054 additions and 3,423 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Internationalization

on:
pull_request:
push:
branches:
- dev
- main
- 'release/**'
- 'feature/**'
- 'fix/**'

env:
WP_MULTISITE: 0

jobs:
check:
name: Setup & Check

runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Node Environment
uses: actions/setup-node@v1
# https://github.com/marketplace/actions/setup-node-js-environment
with:
node-version: 12.x

- name: Cache node modules
uses: actions/cache@v2
env:
npm-cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.npm-cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.npm-cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: NPM Install
run: npm install

- name: Check i18n Compliance
run: npm run i18n:check
50 changes: 50 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Coding Standards

on:
pull_request:
push:
branches:
- dev
- main
- 'release/**'
- 'feature/**'
- 'fix/**'

env:
PHP_VERSION: 7.3
WP_MULTISITE: 0

jobs:
check:
name: Setup & Check

runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup PHP Environment
uses: shivammathur/setup-php@v2
# https://github.com/marketplace/actions/setup-php-action
with:
php-version: ${{ env.PHP_VERSION }}
tools: composer:v1

- name: Cache Composer dependencies
uses: actions/cache@v2
env:
composer-cache-name: cache-vendor
with:
path: ~/vendor
key: ${{ runner.os }}-build-${{ env.composer-cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.composer-cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Composer Dependencies
run: composer install

- name: Check WordPress Coding Standards
run: composer run-script lint
29 changes: 0 additions & 29 deletions .github/workflows/main.yml

This file was deleted.

76 changes: 76 additions & 0 deletions .github/workflows/pr-unit-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: PR Unit Testing

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Triggers the workflow on pull request events
pull_request:

env:
PHP_PREF_MIN_VERSION: '7.3'
WP_STABLE_VERSION: '5.6.*'
WP_MULTISITE: 0

jobs:
test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- job-name: 'Latest Stable Requirements'
bleeding-edge: false
php-version: '7.3'
wordpress-version: '5.6.*'
wp-multisite-mode: 0

name: '${{ matrix.job-name }} (PHP:${{ matrix.php-version }}/WP:${{ matrix.wordpress-version }})'

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup PHP Environment
uses: shivammathur/setup-php@v2
# https://github.com/marketplace/actions/setup-php-action
with:
php-version: ${{ matrix.php-version }}
tools: composer:v1

- name: Setup Node Environment
uses: actions/setup-node@v1
# https://github.com/marketplace/actions/setup-node-js-environment
with:
node-version: 12.x

- name: Cache Composer dependencies
uses: actions/cache@v2
env:
composer-cache-name: cache-vendor
with:
path: ~/vendor
key: ${{ runner.os }}-build-${{ env.composer-cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.composer-cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Require Specified WordPress Version
run: composer require wordpress/wordpress:${{ matrix.wordpress-version }} --dev --prefer-source --update-with-all-dependencies

- name: Update Composer Lockfile for Specified WordPress Version
run: composer update wordpress/wordpress:${{ matrix.wordpress-version }} --lock --prefer-source

- name: PHPUnit PHP 7.4 Support
if: matrix.php-version == '7.4'
run: |
composer global require phpunit/php-code-coverage=dev-master
composer global require sebastian/global-state:dev-master
composer global require phpunit/phpunit=dev-master
- name: NPM Setup
run: npm install

- name: Unit Tests
run: npm run test
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Prepare & Deploy a Release

on:
release:
types: [published]

env:
WP_MULTISITE: 0

jobs:
release:
name: New Release

if: github.repository == 'oidc-wp/openid-connect-generic'

runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Node Environment
uses: actions/setup-node@v1
# https://github.com/marketplace/actions/setup-node-js-environment
with:
node-version: 12.x

- name: Cache Node Modules
uses: actions/cache@v2
env:
npm-cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.npm-cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.npm-cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: NPM Install
run: npm install

- name: Prepare a WordPress.org Release
run: npm run release

- name: WordPress.org Plugin Deploy
uses: nk-o/action-wordpress-plugin-deploy@master
# https://github.com/marketplace/actions/wordpress-plugin-deploy
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SOURCE_DIR: dist/
SLUG: daggerhart-openid-connect-generic
55 changes: 55 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Static Code Analysis

on:
pull_request:
push:
branches:
- dev
- main
- 'release/**'
- 'feature/**'
- 'fix/**'

env:
PHP_VERSION: 7.3
WP_MODE: 'single'
WP_MULTISITE: 0
WP_VERSION: '5.6.*'

jobs:
check:
name: Setup & Check

runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup PHP Environment
uses: shivammathur/setup-php@v2
# https://github.com/marketplace/actions/setup-php-action
with:
php-version: ${{ env.PHP_VERSION }}
tools: composer:v1

- name: Cache Composer dependencies
uses: actions/cache@v2
env:
composer-cache-name: cache-vendor
with:
path: ~/vendor
key: ${{ runner.os }}-build-${{ env.composer-cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.composer-cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Require Specified WordPress Version
run: composer require wordpress/wordpress:${{ env.WP_VERSION }} --dev --prefer-source --update-with-all-dependencies

- name: Install Composer Dependencies
run: composer install

- name: Perform Static Analysis
run: composer run-script analyze
Loading

0 comments on commit 14dbc06

Please sign in to comment.