Skip to content

Fix code scanning alert no. 49: Arbitrary file access during archive extraction ("Zip Slip") #657

Fix code scanning alert no. 49: Arbitrary file access during archive extraction ("Zip Slip")

Fix code scanning alert no. 49: Arbitrary file access during archive extraction ("Zip Slip") #657

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths:
- .github/workflows/build.yml
- cmd/**/*.go
- makefile
- go.mod
- go.sum
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
strategy:
matrix:
goos: [windows, linux, darwin]
arch: [amd64, arm64]
name: "${{ matrix.goos }} | ${{ matrix.arch }}"
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Check out repository code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: go.mod
check-latest: true
- name: Build
run: |
make OS=${{ matrix.goos }} ARCH=${{ matrix.arch }} build
- name: Upload binary
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: cpackget-${{ matrix.goos }}-${{ matrix.arch }}
path: build/cpackget*
retention-days: 7