mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Add zizmor audit
And fix findings. Drive-by: fix windows build
This commit is contained in:
5
.github/workflows/build_test.yml
vendored
5
.github/workflows/build_test.yml
vendored
@@ -112,13 +112,11 @@ jobs:
|
|||||||
|
|
||||||
- name: cmake-win64:msvc-rel
|
- name: cmake-win64:msvc-rel
|
||||||
build_system: cmake
|
build_system: cmake
|
||||||
cmake_generator: Visual Studio 17 2022
|
|
||||||
cmake_config: Release
|
cmake_config: Release
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
||||||
- name: cmake-win64:msvc-dbg
|
- name: cmake-win64:msvc-dbg
|
||||||
build_system: cmake
|
build_system: cmake
|
||||||
cmake_generator: Visual Studio 17 2022
|
|
||||||
cmake_config: Debug
|
cmake_config: Debug
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
||||||
@@ -235,6 +233,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: false
|
submodules: false
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Configure / Build / Test with CMake
|
- name: Configure / Build / Test with CMake
|
||||||
if: ${{ matrix.build_system == 'cmake' }}
|
if: ${{ matrix.build_system == 'cmake' }}
|
||||||
@@ -245,7 +244,6 @@ jobs:
|
|||||||
[ ! -z '${{ matrix.c_compiler || '' }}' ] && CMAKE_OPTIONS+=(-DCMAKE_C_COMPILER='${{ matrix.c_compiler }}')
|
[ ! -z '${{ matrix.c_compiler || '' }}' ] && CMAKE_OPTIONS+=(-DCMAKE_C_COMPILER='${{ matrix.c_compiler }}')
|
||||||
[ ! -z '${{ matrix.cxx_compiler || '' }}' ] && CMAKE_OPTIONS+=(-DCMAKE_CXX_COMPILER='${{ matrix.cxx_compiler }}')
|
[ ! -z '${{ matrix.cxx_compiler || '' }}' ] && CMAKE_OPTIONS+=(-DCMAKE_CXX_COMPILER='${{ matrix.cxx_compiler }}')
|
||||||
[ ! -z '${{ matrix.sanitizer || '' }}' ] && CMAKE_OPTIONS+=(-DENABLE_SANITIZER='${{ matrix.sanitizer }}')
|
[ ! -z '${{ matrix.sanitizer || '' }}' ] && CMAKE_OPTIONS+=(-DENABLE_SANITIZER='${{ matrix.sanitizer }}')
|
||||||
[ ! -z '${{ matrix.cmake_generator || '' }}' ] && export CMAKE_GENERATOR='${{ matrix.cmake_generator }}'
|
|
||||||
declare -a CMAKE_BUILD_OPTIONS=()
|
declare -a CMAKE_BUILD_OPTIONS=()
|
||||||
[ ! -z '${{ matrix.cmake_config || '' }}' ] && CMAKE_BUILD_OPTIONS+=(--config '${{ matrix.cmake_config }}')
|
[ ! -z '${{ matrix.cmake_config || '' }}' ] && CMAKE_BUILD_OPTIONS+=(--config '${{ matrix.cmake_config }}')
|
||||||
declare -a CMAKE_TEST_OPTIONS=()
|
declare -a CMAKE_TEST_OPTIONS=()
|
||||||
@@ -356,6 +354,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: false
|
submodules: false
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Build / Test
|
- name: Build / Test
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
1
.github/workflows/build_test_wasm.yml
vendored
1
.github/workflows/build_test_wasm.yml
vendored
@@ -43,6 +43,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Install node
|
- name: Install node
|
||||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
|
|||||||
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -41,6 +41,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|||||||
9
.github/workflows/lint.yml
vendored
9
.github/workflows/lint.yml
vendored
@@ -36,17 +36,24 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Install tools
|
- name: Install tools
|
||||||
run: |
|
run: |
|
||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
brew install buildifier ruff typos-cli
|
brew install buildifier ruff typos-cli zizmor
|
||||||
|
|
||||||
- name: Check typos
|
- name: Check typos
|
||||||
run: |
|
run: |
|
||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
./scripts/check_typos.sh
|
./scripts/check_typos.sh
|
||||||
|
|
||||||
|
- name: Audit workflows
|
||||||
|
run: |
|
||||||
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
|
zizmor ./.github/workflows
|
||||||
|
|
||||||
- name: Lint Python code
|
- name: Lint Python code
|
||||||
run: |
|
run: |
|
||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
|
|||||||
2
.github/workflows/publish_to_bcr.yaml
vendored
2
.github/workflows/publish_to_bcr.yaml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
id-token: write
|
id-token: write
|
||||||
attestations: write
|
attestations: write
|
||||||
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v2
|
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@005a51c75c5027e54477d290a21aa57e0a1a65f5 # 2026.07.03
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ inputs.tag_name }}
|
tag_name: ${{ inputs.tag_name }}
|
||||||
registry_fork: ${{ inputs.registry_fork }}
|
registry_fork: ${{ inputs.registry_fork }}
|
||||||
|
|||||||
14
.github/workflows/release.yaml
vendored
14
.github/workflows/release.yaml
vendored
@@ -73,21 +73,25 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: false
|
submodules: false
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||||
|
if: github.event_name != 'release'
|
||||||
id: cache-vcpkg
|
id: cache-vcpkg
|
||||||
with:
|
with:
|
||||||
path: vcpkg
|
path: vcpkg
|
||||||
key: release-${{ runner.os }}-vcpkg-${{ env.VCPKG_VERSION }}-${{ matrix.triplet }}
|
key: release-${{ runner.os }}-vcpkg-${{ env.VCPKG_VERSION }}-${{ matrix.triplet }}
|
||||||
|
# TODO(eustas): remove when https://github.com/zizmorcore/zizmor/issues/2071 is fixed
|
||||||
|
lookup-only: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
|
||||||
- name: Download vcpkg
|
- name: Download vcpkg
|
||||||
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
|
if: github.event_name == 'release' || steps.cache-vcpkg.outputs.cache-hit != 'true'
|
||||||
shell: 'powershell'
|
shell: 'powershell'
|
||||||
run: |
|
run: |
|
||||||
Invoke-WebRequest -Uri "https://github.com/microsoft/vcpkg/archive/refs/tags/${{ env.VCPKG_VERSION }}.zip" -OutFile "vcpkg.zip"
|
Invoke-WebRequest -Uri "https://github.com/microsoft/vcpkg/archive/refs/tags/${{ env.VCPKG_VERSION }}.zip" -OutFile "vcpkg.zip"
|
||||||
|
|
||||||
- name: Bootstrap vcpkg
|
- name: Bootstrap vcpkg
|
||||||
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
|
if: github.event_name == 'release' || steps.cache-vcpkg.outputs.cache-hit != 'true'
|
||||||
shell: 'bash'
|
shell: 'bash'
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
@@ -154,6 +158,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: false
|
submodules: false
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Compress testdata
|
- name: Compress testdata
|
||||||
run: |
|
run: |
|
||||||
@@ -180,6 +185,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: false
|
submodules: false
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
@@ -190,8 +196,9 @@ jobs:
|
|||||||
- name: Publish assets
|
- name: Publish assets
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GITHUB_EVENT_RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
|
||||||
run: |
|
run: |
|
||||||
gh release upload ${{ github.event.release.tag_name }} ./release_assets/*
|
gh release upload ${GITHUB_EVENT_RELEASE_TAG_NAME} ./release_assets/*
|
||||||
|
|
||||||
archive_build:
|
archive_build:
|
||||||
needs: publish_release_assets
|
needs: publish_release_assets
|
||||||
@@ -212,6 +219,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: false
|
submodules: false
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Archive
|
- name: Archive
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user