Skip to content

Update to CycloneDX v1.6 standards support (#717) #1008

Update to CycloneDX v1.6 standards support (#717)

Update to CycloneDX v1.6 standards support (#717) #1008

Workflow file for this run

name: MASVS Build
on: [push, workflow_dispatch]
jobs:
Generate-MASVS-Documents:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set MASVS_VERSION to env
run: echo "MASVS_VERSION=$(curl -s https://api.github.com/repos/OWASP/owasp-masvs/tags | jq '.[0].name' | sed 's/\"//g')" >> $GITHUB_ENV
- name: Set DEV MASVS_VERSION if it's not a tag
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: echo "MASVS_VERSION=${{env.MASVS_VERSION}}-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Get Latest MASTG Release Tag
run: echo "MASTG_VERSION=$(curl -s https://api.github.com/repos/OWASP/owasp-mastg/releases/latest | jq '.tag_name' | sed 's/\"//g')" >> $GITHUB_ENV
- name: Generate MASVS yaml
run: python3 ./tools/generate_masvs_yaml.py -v ${{ env.MASVS_VERSION }}
- name: Populate MASVS Categories Markdown Files
run: python3 ./tools/populate_masvs_categories_md.py
- name: Generate PDF and ePub
run: ./tools/docker/pandoc_makedocs.sh Document ${{ env.MASVS_VERSION }} ${{ env.MASTG_VERSION }}
- name: Generate CycloneDX JSON
run: python3 ./tools/generate_masvs_cyclonedx.py
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: OWASP_MASVS
path: OWASP_MASVS*
release:
runs-on: ubuntu-latest
needs: [Generate-MASVS-Documents]
if: startsWith(github.ref, 'refs/tags/') && (github.actor == 'cpholguera' || github.actor == 'sushi2k')
steps:
- uses: actions/download-artifact@v2
- name: Move all files to the root folder
run: mv OWASP_MASVS*/* .
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: false
draft: true
generate_release_notes: true
discussion_category_name: Announcements
files: |
OWASP_MASVS.pdf
OWASP_MASVS.epub
OWASP_MASVS.yaml
OWASP_MASVS.cdx.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}