Skip to content

Commit

Permalink
fix breaks and re-try arm build
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanq16 authored May 10, 2024
1 parent 6df837e commit 777ef61
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
27 changes: 8 additions & 19 deletions security_docker_arm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends \
python3-dev python3-pip python3-setuptools ipython3 iproute2 python3-venv
RUN DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends \
inetutils-ping inetutils-telnet inetutils-tools inetutils-traceroute inetutils-ftp && \
mkdir /opt/executables
mkdir /opt/executables && python3 -m pip install --upgrade setuptools wheel pip

COPY --from=intermediate_builder /executables /opt/executables
COPY --from=intermediate_builder /neovim-linux64.deb /neovim-linux64.deb
Expand Down Expand Up @@ -92,7 +92,6 @@ RUN mkdir /opt/lists/ && cd /opt/lists/ && \
aws/install && \
rm awscliv2.zip && \
rm -rf aws && \
python3 -m pip install boto3 semgrep uploadserver && \
mkdir /root/.aws && \
touch /root/.aws/credentials && \
touch /root/.aws/config && \
Expand All @@ -104,23 +103,14 @@ RUN mkdir /opt/lists/ && cd /opt/lists/ && \
rm $(ls | grep "google.*\.tar\.gz") && \
google-cloud-sdk/install.sh -q && \
echo "[ -f /root/google-cloud-sdk/path.zsh.inc ] && source /root/google-cloud-sdk/path.zsh.inc" >> /root/.zshrc && \
echo "[ -f /root/google-cloud-sdk/completion.zsh.inc ] && source /root/google-cloud-sdk/completion.zsh.inc" >> /root/.zshrc

RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash && \
cd / && \
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
chmod 755 msfinstall && \
./msfinstall && \
rm msfinstall && \
git clone --depth=1 https://gitlab.com/exploit-database/exploitdb.git /opt/exploit-database && \
ln -sf /opt/exploit-database/searchsploit /usr/local/bin/searchsploit
echo "[ -f /root/google-cloud-sdk/completion.zsh.inc ] && source /root/google-cloud-sdk/completion.zsh.inc" >> /root/.zshrc && \
curl -sL https://aka.ms/InstallAzureCLIDeb | bash

# ============================================================================================================
# ========================================================================== Tool Installations Part Two =====
# ============================================================================================================

RUN python3 -m pip install --upgrade setuptools wheel pip && \
cd /opt/executables/ && \
RUN cd /opt/executables/ && \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl" && \
chmod +x kubectl && \
a=$(curl -s https://api.github.com/repos/powershell/powershell/releases/latest | grep -E "browser_download_url.*" | grep -i "linux-arm64.tar.gz" | cut -d '"' -f4) && \
Expand All @@ -129,10 +119,10 @@ RUN python3 -m pip install --upgrade setuptools wheel pip && \
ln -s /opt/powershell/pwsh /usr/bin/pwsh && \
cd /opt && git clone --depth 1 https://github.com/drwetter/testssl.sh.git

RUN python3 -m pip install requests && \
RUN python3 -m venv /opt/pyenv && \
. /opt/pyenv/bin/activate && \
pip install requests boto3 semgrep && \
mkdir /opt/pycloudtools && \
python3 -m venv /opt/pycloudtools/pycloudenv && \
. /opt/pycloudtools/pycloudenv/bin/activate && \
cd /opt/pycloudtools && \
git clone --depth=1 https://github.com/nccgroup/ScoutSuite && cd ScoutSuite && \
pip install --no-cache-dir -r requirements.txt && cd .. && \
Expand All @@ -148,7 +138,6 @@ RUN python3 -m pip install requests && \
# ============================================================================================================
# ============================================================================================================

RUN python3 -m pip install --upgrade pip setuptools wheel && \
DEBIAN_FRONTEND="noninteractive" apt autoclean -y && \
RUN DEBIAN_FRONTEND="noninteractive" apt autoclean -y && \
DEBIAN_FRONTEND="noninteractive" apt autoremove -y && \
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
20 changes: 8 additions & 12 deletions security_docker_main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends \
python3-dev python3-pip python3-setuptools ipython3 iproute2 python3-venv
RUN DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends \
inetutils-ping inetutils-telnet inetutils-tools inetutils-traceroute inetutils-ftp && \
mkdir /opt/executables
mkdir /opt/executables && python3 -m pip install --upgrade setuptools wheel pip

COPY --from=intermediate_builder /executables /opt/executables
COPY --from=intermediate_builder /neovim-linux64.deb /neovim-linux64.deb
Expand Down Expand Up @@ -86,14 +86,12 @@ RUN mkdir /opt/lists/ && cd /opt/lists/ && \
echo $a && wget "https://golang.org$a" && \
b=$(echo $a | cut -d "/" -f3) && \
echo $b && tar -C /usr/local -xzf "$b" && \
rm "$b"

RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
rm "$b" && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
aws/install && \
rm awscliv2.zip && \
rm -rf aws && \
python3 -m pip install boto3 semgrep uploadserver && \
mkdir /root/.aws && \
touch /root/.aws/credentials && \
touch /root/.aws/config && \
Expand All @@ -112,8 +110,7 @@ RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2
# ========================================================================== Tool Installations Part Two =====
# ============================================================================================================

RUN python3 -m pip install --upgrade setuptools wheel pip && \
cd /opt/executables/ && \
RUN cd /opt/executables/ && \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x kubectl && \
a=$(curl -s https://api.github.com/repos/powershell/powershell/releases/latest | grep -E "browser_download_url.*" | grep -i "linux-x64.tar.gz" | cut -d '"' -f4) && \
Expand All @@ -122,10 +119,10 @@ RUN python3 -m pip install --upgrade setuptools wheel pip && \
ln -s /opt/powershell/pwsh /usr/bin/pwsh && \
cd /opt && git clone --depth 1 https://github.com/drwetter/testssl.sh.git

RUN python3 -m pip install requests && \
RUN python3 -m venv /opt/pyenv && \
. /opt/pyenv/bin/activate && \
pip install requests boto3 semgrep && \
mkdir /opt/pycloudtools && \
python3 -m venv /opt/pycloudtools/pycloudenv && \
. /opt/pycloudtools/pycloudenv/bin/activate && \
cd /opt/pycloudtools && \
git clone --depth=1 https://github.com/nccgroup/ScoutSuite && cd ScoutSuite && \
pip install --no-cache-dir -r requirements.txt && cd .. && \
Expand All @@ -141,7 +138,6 @@ RUN python3 -m pip install requests && \
# ============================================================================================================
# ============================================================================================================

RUN python3 -m pip install --upgrade pip setuptools wheel && \
DEBIAN_FRONTEND="noninteractive" apt autoclean -y && \
RUN DEBIAN_FRONTEND="noninteractive" apt autoclean -y && \
DEBIAN_FRONTEND="noninteractive" apt autoremove -y && \
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
11 changes: 5 additions & 6 deletions worker_docker_main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends \
RUN DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends \
p7zip-full python3 python3-pip python3-setuptools iproute2 python3-venv python3-dev \
inetutils-ping inetutils-telnet inetutils-tools inetutils-traceroute inetutils-ftp && \
mkdir /opt/executables
mkdir /opt/executables && python3 -m pip install --upgrade setuptools wheel pip

COPY --from=intermediate_builder /executables /opt/executables
COPY --from=intermediate_builder /neovim-linux64.deb /neovim-linux64.deb
Expand Down Expand Up @@ -76,8 +76,6 @@ RUN cd / && \
aws/install && \
rm awscliv2.zip && \
rm -rf aws && \
python3 -m pip install boto3 requests && \
python3 -m pip install --upgrade setuptools wheel pip && \
mkdir /root/.aws && \
touch /root/.aws/credentials && \
touch /root/.aws/config && \
Expand All @@ -88,13 +86,14 @@ RUN cd / && \
# ========================================================================== Tool Installations Part Two =====
# ============================================================================================================

# Empty for now
RUN python3 -m venv /opt/pyenv && \
. /opt/pyenv/bin/activate && \
pip install boto3 requests

# ============================================================================================================
# ============================================================================================================
# ============================================================================================================

RUN python3 -m pip install --upgrade pip setuptools wheel && \
DEBIAN_FRONTEND="noninteractive" apt autoclean -y && \
RUN DEBIAN_FRONTEND="noninteractive" apt autoclean -y && \
DEBIAN_FRONTEND="noninteractive" apt autoremove -y && \
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config

0 comments on commit 777ef61

Please sign in to comment.