diff --git a/.github/workflows/scans.yml b/.github/workflows/scans.yml index b9805679..460289a5 100644 --- a/.github/workflows/scans.yml +++ b/.github/workflows/scans.yml @@ -68,6 +68,38 @@ jobs: scan_main_container: runs-on: ubuntu-latest steps: + - name: Aggressive cleanup + run: | + # Remove Java (JDKs) + sudo rm -rf /usr/lib/jvm + + # Remove .NET SDKs + sudo rm -rf /usr/share/dotnet + + # Remove Swift toolchain + sudo rm -rf /usr/share/swift + + # Remove Haskell (GHC) + sudo rm -rf /usr/local/.ghcup + + # Remove Julia + sudo rm -rf /usr/local/julia* + + # Remove Android SDKs + sudo rm -rf /usr/local/lib/android + + # Remove Chromium (optional if not using for browser tests) + sudo rm -rf /usr/local/share/chromium + + # Remove Microsoft/Edge and Google Chrome builds + sudo rm -rf /opt/microsoft /opt/google + + # Remove Azure CLI + sudo rm -rf /opt/az + + # Remove PowerShell + sudo rm -rf /usr/local/share/powershell + - name: Harden Runner uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 with: diff --git a/Dockerfile b/Dockerfile index a2eba5cd..d1bf857c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -204,8 +204,15 @@ cp /workspace/tsffs/harness/tsffs.h /workspace/projects/example/ ninja EOF + +RUN <> ~/.bashrc WORKDIR /workspace/tsffs @@ -214,6 +221,7 @@ FROM create-user AS tsffs-prod ARG PUBLIC_SIMICS_PKGS_URL ARG PUBLIC_SIMICS_ISPM_URL ARG PUBLIC_SIMICS_PACKAGE_VERSION_1000 +ARG USERNAME ENV SIMICS_BASE="/workspace/simics/simics-${PUBLIC_SIMICS_PACKAGE_VERSION_1000}/" # Add cargo and ispm to the path ENV PATH="/home/${USERNAME}/.cargo/bin:/workspace/simics/ispm:${PATH}" @@ -249,4 +257,5 @@ RUN rm -r /workspace/tsffs RUN chmod 775 /workspace USER vscode +RUN echo 'echo "To run the demo, run ./simics -no-gui --no-win fuzz.simics"' >> "/home/${USERNAME}/.bashrc" WORKDIR /workspace/projects/example