Skip to content

feat(training): add NVIDIA ARM64 support for LeRobot 0.6.1 #4390

feat(training): add NVIDIA ARM64 support for LeRobot 0.6.1

feat(training): add NVIDIA ARM64 support for LeRobot 0.6.1 #4390

Workflow file for this run

name: Gitleaks Secret Scan
on:
pull_request:
push:
branches:
- main
workflow_call:
inputs:
soft-fail:
description: 'Whether to continue on secret detection'
required: false
type: boolean
default: false
permissions:
contents: read
jobs:
scan:
name: Gitleaks Secret Scan
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Download and verify gitleaks
shell: bash
run: |
set -euo pipefail
GITLEAKS_VERSION="8.30.0"
GITLEAKS_SHA256="79a3ab579b53f71efd634f3aaf7e04a0fa0cf206b7ed434638d1547a2470a66e"
GITLEAKS_URL="https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz"
GITLEAKS_TARBALL="gitleaks.tar.gz"
echo "Downloading gitleaks v${GITLEAKS_VERSION}..."
curl -fsSL -o "${GITLEAKS_TARBALL}" "${GITLEAKS_URL}"
echo "Verifying SHA256 checksum..."
echo "${GITLEAKS_SHA256} ${GITLEAKS_TARBALL}" | sha256sum -c -
echo "Extracting gitleaks binary..."
tar -xzf "${GITLEAKS_TARBALL}" gitleaks
chmod +x gitleaks
echo "Gitleaks version:"
./gitleaks version
- name: Run gitleaks scan
id: gitleaks
shell: bash
run: |
set -euo pipefail
mkdir -p logs
SCAN_ARGS=(
"git"
"--report-format" "sarif"
"--report-path" "logs/gitleaks-results.sarif"
"--redact"
"--log-level" "info"
)
if [ -f ".gitleaksignore" ]; then
echo "Found .gitleaksignore — known secrets will be suppressed."
fi
echo "Running gitleaks scan..."
EXIT_CODE=0
./gitleaks "${SCAN_ARGS[@]}" || EXIT_CODE=$?
if [ "$EXIT_CODE" -eq 0 ]; then
echo "No secrets detected."
echo "leaks-found=false" >> "$GITHUB_OUTPUT"
elif [ "$EXIT_CODE" -eq 1 ]; then
echo "::warning::Gitleaks detected secrets in the repository."
echo "leaks-found=true" >> "$GITHUB_OUTPUT"
if [ "${{ inputs.soft-fail }}" != "true" ]; then
echo "::error::Secret scanning failed. Review detected secrets in logs/gitleaks-results.sarif"
exit 1
fi
else
echo "::error::Gitleaks encountered an unexpected error (exit code: $EXIT_CODE)"
exit "$EXIT_CODE"
fi
- name: Upload SARIF to Security tab
if: always()
uses: github/codeql-action/upload-sarif@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
with:
sarif_file: logs/gitleaks-results.sarif
category: gitleaks
continue-on-error: true
- name: Upload scan results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: gitleaks-results
path: logs/gitleaks-results.sarif
retention-days: 90
- name: Add job summary
if: always()
shell: bash
run: |
LEAKS_FOUND="${{ steps.gitleaks.outputs.leaks-found }}"
if [ "$LEAKS_FOUND" = "true" ]; then
STATUS="⚠️ Secrets Detected"
else
STATUS="✅ No Secrets Found"
fi
cat >> "$GITHUB_STEP_SUMMARY" <<EOF
## Gitleaks Secret Scan Results
| Metric | Value |
|--------|-------|
| Status | $STATUS |
EOF