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

Reduce image size by adding flag depth 1 when git cloning #333

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

gbe
Copy link
Contributor

@gbe gbe commented Apr 15, 2024

I noticed that some tools missed the flag --depth 1 for git clone.

For some tools, it was simply forgotten.

For others, the flag --depth 1 was removed for temp fixes reasons.
This PR reinstates the depth flag to clone directly the appropriate branch in a single command instead of doing a git clone followed by a git checkout:

  • Example with sliver: git -C /opt/tools/ clone --branch v1.5.41 --depth 1 https://github.com/BishopFox/sliver.git

  • Another with Bloodhound-CE: git -C /opt/tools/ clone --branch bloodhound-ce --depth 1 https://github.com/dirkjanm/BloodHound.py BloodHound-CE.py

About sliver, I moved the temp fix criticalecho at the beginning of the function to only clone the repo if the date condition is met. I hope it's ok like this.

@gbe gbe changed the base branch from main to dev April 15, 2024 11:33
@ShutdownRepo ShutdownRepo self-assigned this Apr 15, 2024
@ShutdownRepo ShutdownRepo added enhancement New feature or request under review Time to think about the need / implementation labels Apr 15, 2024
@QU35T-code
Copy link
Member

QU35T-code commented Apr 15, 2024

It may be a deliberate "miss". I have to check if it works even if we add depth 1

@QU35T-code
Copy link
Member

Let’s see what the runners think 😄

@QU35T-code QU35T-code changed the base branch from dev to main April 15, 2024 13:04
@QU35T-code QU35T-code changed the base branch from main to dev April 15, 2024 13:05
@QU35T-code QU35T-code marked this pull request as draft April 15, 2024 13:06
@QU35T-code QU35T-code marked this pull request as ready for review April 15, 2024 13:06
@QU35T-code
Copy link
Member

Hey @gbe,

Can you push a commit to sync the pipeline ?

@gbe
Copy link
Contributor Author

gbe commented Apr 15, 2024

Done

@QU35T-code
Copy link
Member

Pipeline is ok ☑️

@QU35T-code QU35T-code added ready for merge in the waitlist for merge, requires preliminary steps and removed under review Time to think about the need / implementation labels Apr 15, 2024
@ShutdownRepo ShutdownRepo merged commit 9c8eadb into ThePorgs:dev Apr 16, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready for merge in the waitlist for merge, requires preliminary steps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants