Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
63 changes: 63 additions & 0 deletions .github/workflows/generate_algorithm_families.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Generate Algorithm Families Enum

on:
push:
paths:
- 'schema/cryptography-defs.json'
- 'tools/src/main/python/algorithmFamilyGeneration.py'
workflow_dispatch:

jobs:
generate-families:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Run algorithm family generator
working-directory: tools/src/main/python
run: python3 algorithmFamilyGeneration.py

- name: Create Pull Request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH_NAME="update-algorithm-families"

# Configure Git
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"

# Check for changes
if git diff --quiet schema/cryptography-defs.schema.json; then
echo "No changes to algorithm families"
exit 0
fi

# Create branch and commit
git checkout -b "$BRANCH_NAME"
git add schema/cryptography-defs.schema.json
git commit -m "chore: update algorithm families [skip ci]"

# Push to the branch (use GH_TOKEN for authentication)
git push -u "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" "$BRANCH_NAME" --force

# Create Pull Request using GitHub CLI (gh)
gh pr create \
--title "chore: update algorithm families" \
--body "This PR updates \`schema/cryptography-defs.schema.json\` with the latest algorithm families generated from \`schema/cryptography-defs.json\`." \
--base "master" \
--head "$BRANCH_NAME" || echo "Pull request already exists"
18 changes: 10 additions & 8 deletions schema/cryptography-defs.schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://cyclonedx.org/schema/cryptography-defs.schema.json",
"$comment": "2025-09-07T11:12:52Z",
"$comment": "2026-02-19T23:43:11Z",
"title": "Cryptographic Algorithm Family Definitions",
"description": "Enumerates cryptographic algorithm families and their specific metadata.",
"type": "object",
Expand Down Expand Up @@ -259,9 +259,9 @@
"CAST6",
"CMAC",
"CMEA",
"CTR_DRBG",
"ChaCha",
"ChaCha20",
"CTR_DRBG",
"DES",
"DSA",
"ECDH",
Expand All @@ -272,12 +272,12 @@
"FFDH",
"Fortuna",
"GOST",
"Hash_DRBG",
"HPKE",
"HC",
"HKDF",
"HMAC",
"HMAC_DRBG",
"HPKE",
"Hash_DRBG",
"IDEA",
"IKE-PRF",
"J-PAKE",
Expand Down Expand Up @@ -307,7 +307,6 @@
"RSAES-PKCS1",
"RSASSA-PKCS1",
"RSASSA-PSS",
"scrypt",
"SEED",
"SHA-1",
"SHA-2",
Expand All @@ -319,11 +318,13 @@
"SM9",
"SNOW3G",
"SP800-108",
"SPAKE2",
"SPAKE2PLUS",
"SRP",
"Salsa20",
"Serpent",
"SipHash",
"Skipjack",
"SRP",
"TUAK",
"Twofish",
"UMAC",
Expand All @@ -332,7 +333,8 @@
"XMSS",
"Yarrow",
"ZUC",
"bcrypt"
"bcrypt",
"scrypt"
]
},
"ellipticCurvesEnum": {
Expand Down Expand Up @@ -587,4 +589,4 @@
]
}
}
}
}