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

Conversation

dav3r
Copy link
Member

@dav3r dav3r commented Apr 6, 2021

🗣 Description

This PR switches from using gophish/gophish to cisagov/gophish as the basis for the Docker image generated by this repository.

💭 Motivation and context

The cisagov/gophish contains some mission-critical customizations (e.g. gophish/gophish#1486) that have not yet been merged in to gophish/gophish, so until that happens, we will use our own fork. Issue #25 has been created to revert back to the parent repo at a later date.

🧪 Testing

I successfully built cisagov/gophish:0.11.0-cisa.1 with the updated Dockerfile from this PR. Once it was built, I verified that it worked as expected by pulling it down to a Staging Gophish instance and using it there without any problems.

✅ Checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

The cisagov fork of the gophish repo contains some mission-critical 
customizations (e.g. gophish/gophish#1486) that 
have not yet been merged in to the parent repo, so we will use our own 
fork until that happens.
@dav3r dav3r added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Apr 6, 2021
@dav3r dav3r mentioned this pull request Apr 6, 2021
2 tasks
Copy link
Member

@felddy felddy left a comment

Choose a reason for hiding this comment

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

Looks good. Took a semver jab for posterity.
👊 💪

@@ -10,7 +10,7 @@ ARG VERSION
LABEL org.opencontainers.image.authors="mark.feldhousen@cisa.dhs.gov"
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

Copy link
Contributor

@hillaryj hillaryj left a comment

Choose a reason for hiding this comment

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

🌮

@dav3r dav3r merged commit ca63e3f into develop Apr 6, 2021
@dav3r dav3r deleted the improvement/use-cisagov-fork-of-gophish branch April 6, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants