Skip to content

Commit

Permalink
Install binskim through dotnet sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
miz060 committed Feb 20, 2025
1 parent 51b56c5 commit e941a7c
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/binskim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,31 @@ jobs:
echo "Installing dependencies..."
sudo apt-get update
sudo apt-get install -y git golang rustc cargo build-essential protobuf-compiler libprotobuf-dev expect libssl-dev clang libseccomp-dev btrfs-progs libdevmapper-dev cmake libfuse-dev
sudo add-apt-repository ppa:dotnet/backports
sudo apt-get install -y dotnet-sdk-9.0 aspnetcore-runtime-9.0 dotnet-runtime-9.0 zlib1g
- name: Download and Install BinSkim
- name: Set up BinSkim
run: |
echo "Downloading BinSkim..."
curl -L -o binskim https://github.com/microsoft/binskim/releases/latest/download/BinSkim-linux-x64
chmod +x binskim
sudo mv binskim /usr/local/bin/
echo "BinSkim installed successfully."
binskim --version || echo "BinSkim installed but no version command."
dotnet new console -n TempConsoleApp
cd TempConsoleApp
echo "Installing BinSkim version 1.9.5"
dotnet add package Microsoft.CodeAnalysis.BinSkim --version 1.9.5
ls ~/.nuget/packages/microsoft.codeanalysis.binskim/
sudo mv ~/.nuget/packages/microsoft.codeanalysis.binskim/ $GITHUB_WORKSPACE
echo "BinSkim files moved to: $GITHUB_WORKSPACE"
ls $GITHUB_WORKSPACE
echo "BINSKIM_EXECUTABLE=${GITHUB_WORKSPACE}/microsoft.codeanalysis.binskim/1.9.5/tools/netcoreapp3.1/linux-x64/BinSkim" >> $GITHUB_ENV
- name: Build kata artifacts
run: |
echo "Building kata-agent binary"
agent_make_flags="LIBC=gnu OPENSSL_NO_VENDOR=Y DESTDIR=${AGENT_INSTALL_DIR} BUILD_TYPE=${AGENT_BUILD_TYPE}"
agent_make_flags+=" AGENT_POLICY=yes"
pushd src/agent/
make ${agent_make_flags}
popd
echo "Building kata-runtime binary"
runtime_make_flags="SKIP_GO_VERSION_CHECK=1 QEMUCMD= FCCMD= ACRNCMD= STRATOVIRTCMD= DEFAULT_HYPERVISOR=cloud-hypervisor
DEFMEMSZ=0 DEFSTATICSANDBOXWORKLOADMEM=512 DEFVCPUS=0 DEFSTATICSANDBOXWORKLOADVCPUS=1 DEFVIRTIOFSDAEMON=${VIRTIOFSD_BINARY_LOCATION} PREFIX=${INSTALL_PATH_PREFIX}"
runtime_make_flags+=" CLHPATH=${CLOUD_HYPERVISOR_LOCATION}"
Expand All @@ -54,6 +60,7 @@ jobs:
make all
popd
echo "Building tardev-snapshotter service binary"
pushd src/tardev-snapshotter/
make all
popd
Expand Down

0 comments on commit e941a7c

Please sign in to comment.