Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: go-webauthn/webauthn
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.10.2
Choose a base ref
...
head repository: go-webauthn/webauthn
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.12.2
Choose a head ref
Loading
Showing with 4,087 additions and 1,679 deletions.
  1. +4 −7 .github/ISSUE_TEMPLATE/bug-report.yml
  2. +11 −0 .github/dependabot.yml
  3. +78 −0 .github/workflows/codeql.yml
  4. +27 −0 .github/workflows/dependency-review.yml
  5. +12 −4 .github/workflows/go.yml
  6. +76 −0 .github/workflows/scorecards.yml
  7. +14 −0 .pre-commit-config.yaml
  8. +1 −1 .renovaterc
  9. +114 −8 README.md
  10. +9 −7 go.mod
  11. +12 −12 go.sum
  12. +35 −0 metadata/const.go
  13. +274 −0 metadata/decode.go
  14. +2 −0 metadata/doc.go
  15. +711 −510 metadata/metadata.go
  16. +132 −124 metadata/metadata_test.go
  17. +16 −0 metadata/passkey_authenticator.go
  18. +8 −0 metadata/providers/cached/doc.go
  19. +92 −0 metadata/providers/cached/options.go
  20. +146 −0 metadata/providers/cached/provider.go
  21. +51 −0 metadata/providers/cached/util.go
  22. +4 −0 metadata/providers/memory/doc.go
  23. +90 −0 metadata/providers/memory/options.go
  24. +93 −0 metadata/providers/memory/provider.go
  25. +62 −0 metadata/status.go
  26. +329 −0 metadata/types.go
  27. +34 −19 protocol/assertion.go
  28. +6 −6 protocol/assertion_test.go
  29. +58 −55 protocol/attestation.go
  30. +20 −24 protocol/attestation_androidkey.go
  31. +3 −5 protocol/attestation_androidkey_test.go
  32. +10 −12 protocol/attestation_apple.go
  33. +3 −5 protocol/attestation_apple_test.go
  34. +18 −25 protocol/attestation_packed.go
  35. +3 −3 protocol/attestation_packed_test.go
  36. +27 −33 protocol/attestation_safetynet.go
  37. +4 −2 protocol/attestation_safetynet_test.go
  38. +16 −40 protocol/attestation_test.go
  39. +169 −79 protocol/attestation_tpm.go
  40. +33 −31 protocol/attestation_tpm_test.go
  41. +5 −7 protocol/attestation_u2f.go
  42. +3 −5 protocol/attestation_u2f_test.go
  43. +37 −7 protocol/authenticator.go
  44. +2 −3 protocol/base64.go
  45. +6 −12 protocol/base64_test.go
  46. +2 −0 protocol/challenge_test.go
  47. +89 −8 protocol/client.go
  48. +7 −14 protocol/client_test.go
  49. +11 −0 protocol/const.go
  50. +28 −24 protocol/credential.go
  51. +6 −130 protocol/credential_test.go
  52. +17 −0 protocol/decoder.go
  53. +2 −11 protocol/entities.go
  54. +36 −18 protocol/errors.go
  55. +1 −1 protocol/extensions.go
  56. +126 −0 protocol/metadata.go
  57. +86 −16 protocol/options.go
  58. +1 −1 protocol/options_test.go
  59. +2 −2 protocol/webauthncbor/webauthncbor.go
  60. +0 −2 protocol/webauthncose/ed25519.go
  61. +0 −38 protocol/webauthncose/ed25519_go112.go
  62. +158 −197 protocol/webauthncose/webauthncose.go
  63. +1 −1 protocol/webauthncose/webauthncose_test.go
  64. +0 −1 webauthn/const.go
  65. +96 −16 webauthn/credential.go
  66. +17 −15 webauthn/credential_test.go
  67. +144 −48 webauthn/login.go
  68. +107 −0 webauthn/login_test.go
  69. +144 −29 webauthn/registration.go
  70. +91 −1 webauthn/registration_test.go
  71. +52 −53 webauthn/types.go
  72. +3 −7 webauthn/{user.go → types_test.go}
11 changes: 4 additions & 7 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -18,20 +18,17 @@ body:
description: What version of the library are you using or which versions do you see the issue in?
multiple: true
options:
- 0.11.2
- 0.11.1
- 0.11.0
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.4
- 0.9.3
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.6
- 0.8.5
- 0.8.4
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
validations:
required: true
- type: textarea
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

- package-ecosystem: gomod
directory: /
schedule:
interval: daily
78 changes: 78 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# 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: ["master"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["master"]
schedule:
- cron: "0 0 * * 1"

permissions:
contents: read

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

strategy:
fail-fast: false
matrix:
language: ["go"]
# CodeQL supports [ $supported-codeql-languages ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
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.

# Autobuild attempts to build any compiled languages (C/C++, C#, 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@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11

# ℹ️ 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@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
with:
category: "/language:${{matrix.language}}"
27 changes: 27 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Dependency Review'
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
16 changes: 12 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -4,24 +4,32 @@ on:
push:
branches:
- master
permissions:
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
go:
- '1.20'
- '1.21'
- '1.22'
- '1.23'
- '1.24'
fail-fast: false
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v3
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get dependencies
run: |
go get -v -t -d ./...
76 changes: 76 additions & 0 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '20 7 * * 2'
push:
branches: ["master"]

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

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
contents: read
actions: read

steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit

- name: "Checkout code"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" 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_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always 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/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
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/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
with:
sarif_file: results.sarif
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.3
hooks:
- id: gitleaks
- repo: https://github.com/golangci/golangci-lint
rev: v1.52.2
hooks:
- id: golangci-lint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
2 changes: 1 addition & 1 deletion .renovaterc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"constraints": {
"go": "1.21"
"go": "1.24"
},
"extends": [
"config:base",
Loading