Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cisagov fork of gophish #24

Merged
merged 3 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG VERSION
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.vendor="Cybersecurity and Infrastructure Security Agency"

ARG GOPHISH_VERSION="0.7.1"
ARG GOPHISH_VERSION="0.11.0-cisa.1"
Copy link
Member

@felddy felddy Apr 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you no use + metadata?
e.g., 0.11.0+cisa.1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @felddy for the reminder about this. I did use + instead of - originally, but when GitHub Actions created the release assets (e.g. https://github.com/cisagov/gophish/releases/tag/v0.11.0-cisa.1), the download URLs for the platform-specific zip files were different from what was expected.

Instead of generating URLs like this: https://github.com/cisagov/gophish/releases/download/v0.11.0%2Bcisa.1/gophish-v0.11.0%2Bcisa.1-linux-64bit.zip

GitHub Actions was generating URLs like this: https://github.com/cisagov/gophish/releases/download/v0.11.0%2Bcisa.1/gophish-v0.11.0.cisa.1-linux-64bit.zip

The first + was being correctly URL encoded to %2B, but the second one was being converted to a . and that was going to be a hassle for us here:

RUN wget -nv https://github.com/gophish/gophish/releases/download/${GOPHISH_VERSION}/gophish-v${GOPHISH_VERSION}-linux-64bit.zip && \
unzip gophish-v${GOPHISH_VERSION}-linux-64bit.zip && \
rm -f gophish-v${GOPHISH_VERSION}-linux-64bit.zip

ARG CISA_UID=421
ENV CISA_HOME="/home/cisa" \
SCRIPT_DIR="/usr/local/bin"
Expand All @@ -30,7 +30,12 @@ COPY bin/get-api-key ${SCRIPT_DIR}

USER cisa
WORKDIR ${CISA_HOME}
RUN wget -nv https://github.com/gophish/gophish/releases/download/${GOPHISH_VERSION}/gophish-v${GOPHISH_VERSION}-linux-64bit.zip && \
# TODO: Revert from cisagov/gophish back to gophish/gophish after all of our
# pull requests have been merged; including, but potentially not limited to:
# - https://github.com/gophish/gophish/pull/1484
# - https://github.com/gophish/gophish/pull/1486
# See https://github.com/cisagov/gophish-docker/issues/25 for details.
RUN wget -nv https://github.com/cisagov/gophish/releases/download/v${GOPHISH_VERSION}/gophish-v${GOPHISH_VERSION}-linux-64bit.zip && \
unzip gophish-v${GOPHISH_VERSION}-linux-64bit.zip && \
rm -f gophish-v${GOPHISH_VERSION}-linux-64bit.zip

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
# Note build arguments here are for builds using docker-compose (pytest)
# The CI build workflow uses docker and passes the value from bump_version
args:
- VERSION=0.0.5
- VERSION=0.0.6
context: .
dockerfile: Dockerfile
image: cisagov/gophish
Expand Down
2 changes: 1 addition & 1 deletion src/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.5"
__version__ = "0.0.6"