Skip to content
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

Merge release 4.6.0 into 5.0.x #413

Merged
merged 27 commits into from
Jun 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e1bdc28
The TPMAttestationStatementSupport::create method should allow PSR-20…
Spomky Jan 23, 2023
4c069f0
Update tweet.yml (#368)
Spomky Jan 23, 2023
aa528cb
Improves deprecation messages (#371)
Spomky Jan 24, 2023
2272c23
Allow resident key to be `null` (#377)
Spomky Jan 31, 2023
275613f
Merge pull request #378 from web-auth/4.5.x-merge-up-into-4.6.x_W57HpZiq
Spomky Jan 31, 2023
fde8144
Bump actions/checkout from 3.2.0 to 3.3.0 (#379)
dependabot[bot] Jan 31, 2023
e10ba09
Bump ridedott/merge-me-action from 2.10.40 to 2.10.43 (#380)
dependabot[bot] Jan 31, 2023
dcd5852
New PHPUnit 10.0 (#382)
Spomky Mar 2, 2023
c000f97
Split User Repository Registration mode (#385)
Spomky Mar 11, 2023
67c3291
Mutual require key parameter (#386)
Spomky Mar 11, 2023
7f50eb2
Bump actions/checkout from 3.3.0 to 3.5.0 (#389)
dependabot[bot] Apr 14, 2023
69817f4
Bump ridedott/merge-me-action from 2.10.43 to 2.10.44 (#388)
dependabot[bot] Apr 14, 2023
81dfb98
PublicKeyCredentialSourceRepository is now deprecated (#384)
Spomky Apr 14, 2023
7ff46e3
Bump ridedott/merge-me-action from 2.10.44 to 2.10.45 (#395)
dependabot[bot] May 11, 2023
5f9bd25
Bump actions/checkout from 3.5.0 to 3.5.2 (#394)
dependabot[bot] May 11, 2023
b084f8b
Rector/Phpunit fixed (#397)
Spomky May 12, 2023
8944b9e
Merge release 4.5.2 into 4.6.x (#400)
Spomky May 13, 2023
193d8a5
Add new RememberMeBadge (#402)
Spomky May 21, 2023
c2a0c5d
Scorecards (#403)
Spomky May 23, 2023
cc3deb2
Ci cd/scorecards (#404)
Spomky May 23, 2023
40d72df
Scorecards (#405)
Spomky May 23, 2023
24606e3
Create codeql.yml (#407)
Spomky May 31, 2023
fb7f3d7
Create dependency-review.yml (#408)
Spomky May 31, 2023
23137b0
Bump actions/dependency-review-action from 2 to 3 (#411)
dependabot[bot] Jun 1, 2023
f705754
Bump ridedott/merge-me-action from 2.10.45 to 2.10.47 (#410)
dependabot[bot] Jun 1, 2023
dabd1f8
Features/importmap (#409)
Spomky Jun 1, 2023
a31ee1f
Merge branch '5.0.x' into 4.6.x-merge-up-into-5.0.x_Ifwv6y9d
Spomky Jun 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* text=auto

/.github export-ignore
/bin export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
Expand All @@ -14,6 +15,7 @@
/jest.config.js export-ignore
/Makefile export-ignore
/phpstan.neon export-ignore
/phpstan-baseline.neon export-ignore
/phpunit.xml.dist export-ignore
/rector.php export-ignore
/rollup.config.js export-ignore
Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ updates:
open-pull-requests-limit: 20
allow:
- dependency-type: all
labels: [ "Dependencies" ]
labels: [ "dependencies" ]

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 20
labels: [ "Dependencies" ]
labels: [ "dependencies" ]
76 changes: 76 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "*.*.x" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "4.6.x" ]
schedule:
- cron: '37 10 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ${{ 'ubuntu-latest' }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
16 changes: 8 additions & 8 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout code"
uses: "actions/checkout@v3.2.0"
uses: "actions/checkout@v3.5.2"

- name: "Check file permissions"
run: |
Expand All @@ -35,7 +35,7 @@ jobs:
coverage: "none"

- name: "Checkout code"
uses: "actions/checkout@v3.2.0"
uses: "actions/checkout@v3.5.2"

- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
coverage: "xdebug"

- name: "Checkout code"
uses: "actions/checkout@v3.2.0"
uses: "actions/checkout@v3.5.2"

- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
coverage: "none"

- name: "Checkout code"
uses: "actions/checkout@v3.2.0"
uses: "actions/checkout@v3.5.2"

- name: "Validate Composer configuration"
run: "composer validate"
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
coverage: "none"

- name: "Checkout code"
uses: "actions/checkout@v3.2.0"
uses: "actions/checkout@v3.5.2"

- name: "Check adherence to EditorConfig"
uses: "greut/eclint-action@v0"
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
coverage: "xdebug"

- name: "Checkout code"
uses: "actions/checkout@v3.2.0"
uses: "actions/checkout@v3.5.2"

- name: "Fetch Git base reference"
run: "git fetch --depth=1 origin ${GITHUB_BASE_REF}"
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
coverage: "xdebug"

- name: "Checkout code"
uses: "actions/checkout@v3.2.0"
uses: "actions/checkout@v3.5.2"

- name: "Fetch Git base reference"
run: "git fetch --depth=1 origin ${GITHUB_BASE_REF}"
Expand All @@ -222,7 +222,7 @@ jobs:
runs-on: "ubuntu-20.04"
steps:
- name: "Checkout code"
uses: "actions/checkout@v3.2.0"
uses: "actions/checkout@v3.5.2"

- name: "Check exported files"
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge-me.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Merge me!
uses: ridedott/[email protected].40
uses: ridedott/[email protected].47
with:
# Depending on branch protection rules, a manually populated
# `GITHUB_TOKEN_WORKAROUND` environment variable with permissions to
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3.2.0"
uses: "actions/checkout@v3.5.2"

- name: "Release"
uses: "laminas/[email protected]"
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Scorecards supply-chain security

on:
# Only the default branch is supported.
branch_protection_rule:
schedule:
- cron: '34 4 * * 6'
push:
branches: [ "4.6.x" ]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Used to receive a badge. (Upcoming feature)
id-token: write
# Needs for private repositories.
contents: read
actions: read

steps:
- name: "Checkout code"
uses: actions/[email protected]
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/[email protected]
with:
results_file: results.sarif
results_format: sarif
# (Optional) Read-only PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecards on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}

# Publish the results for public repositories to enable scorecard badges. For more details, see
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/[email protected]
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/[email protected]
with:
sarif_file: results.sarif
23 changes: 0 additions & 23 deletions .github/workflows/tweet.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: mu
mu: vendor ## Mutation tests
vendor/bin/infection -s --threads=$$(nproc) --min-msi=30 --min-covered-msi=50
vendor/bin/infection -v -s --threads=$$(nproc) --min-msi=45 --min-covered-msi=60

.PHONY: tests
tests: vendor ## Run all tests
Expand Down Expand Up @@ -36,7 +36,7 @@ st: vendor ## Run static analyse

.PHONY: ci-mu
ci-mu: vendor ## Mutation tests (for CI/CD only)
vendor/bin/infection --logger-github -s --threads=$$(nproc) --min-msi=30 --min-covered-msi=50
vendor/bin/infection --logger-github -s --threads=$$(nproc) --min-msi=45 --min-covered-msi=60

.PHONY: ci-cc
ci-cc: vendor ## Show test coverage rates (for CI/CD only)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Webauthn Framework
[![Latest Unstable Version](https://poser.pugx.org/web-auth/webauthn-framework/v/unstable.png)](https://packagist.org/packages/web-auth/webauthn-framework)
[![License](https://poser.pugx.org/web-auth/webauthn-framework/license.png)](https://packagist.org/packages/web-auth/webauthn-framework)

[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/web-auth/webauthn-framework/badge)](https://api.securityscorecards.dev/projects/github.com/web-auth/webauthn-framework)

Webauthn defines an API enabling the creation and use of strong, attested, scoped, public key-based credentials by web
applications, for the purpose of strongly authenticating users.

Expand Down
3 changes: 2 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
['@babel/preset-typescript', {allowDeclareFields: true}],
'@babel/react',
['@babel/preset-typescript', { allowDeclareFields: true }]
],
};
29 changes: 29 additions & 0 deletions bin/build_javascript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* This file is used to compile the TypeScript files in the assets/src directory
* of each package.
*
* It allows each package to spawn its own rollup process, which is necessary
* to keep memory usage down.
*/
const { spawnSync } = require('child_process');
const glob = require('glob');

const files = [
...glob.sync('src/*/assets/src/*controller.ts'),
];

files.forEach((file) => {
const result = spawnSync('node', [
'node_modules/.bin/rollup',
'-c',
'--environment',
`INPUT_FILE:${file}`,
], {
stdio: 'inherit',
shell: true
});

if (result.error) {
console.error(`Error compiling ${file}:`, result.error);
}
});
Loading