microsoft/hve-core

Public

mirrored fromhttps://github.com/microsoft/hve-coreAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/fix-copilot-code-review

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.devcontainer/scripts/on-create.sh

32lines · modecode

1#!/usr/bin/env bash
2#
3# on-create.sh
4# Install system dependencies for HVE Core development container
5
6set -euo pipefail
7
8main() {
9 echo "Installing system dependencies..."
10
11 sudo apt update
12 sudo apt install -y shellcheck
13
14 # Dependencies are pinned for stability. Dependabot and security workflows manage updates.
15 echo "Installing gitleaks..."
16 # Download gitleaks tarball and verify checksum before extracting
17 EXPECTED_SHA256="6298c9235dfc9278c14b28afd9b7fa4e6f4a289cb1974bd27949fc1e9122bdee"
18 curl -sSfL https://github.com/gitleaks/gitleaks/releases/download/v8.18.2/gitleaks_8.18.2_linux_x64.tar.gz -o /tmp/gitleaks.tar.gz
19
20 echo "Checking gitleaks tarball integrity..."
21 if ! echo "${EXPECTED_SHA256} /tmp/gitleaks.tar.gz" | sha256sum -c --quiet -; then
22 echo "ERROR: SHA256 checksum verification failed for gitleaks tarball" >&2
23 rm /tmp/gitleaks.tar.gz
24 exit 1
25 fi
26 sudo tar -xzf /tmp/gitleaks.tar.gz -C /usr/local/bin gitleaks
27 rm /tmp/gitleaks.tar.gz
28
29 echo "System dependencies installed successfully"
30}
31
32main "$@"
33