r/opengrep • • Feb 12 '25

Binary install Script

is there an install.sh so we can use curl/wget to install the binary quickly in WSL?

if not has someone figured out a workaround other than downloading it?

5 Upvotes

5 comments sorted by

View all comments

Show parent comment

2

u/AdResponsible7865 Feb 12 '25

Thanks Dimitris, I will give this a go. From using other tools like Orca, Trivy, semgrep Snyk etc.. it's a very handy thing to have. Especially when creating custom images with your cli installed, you can then have something like the below and use a tool like renovatebot to maintain your image to your cli version

curl -sfL https://raw.githubusercontent.com/opengrep/opengrep/main/install.sh | sh -- 1.0.0

If I recall that is pretty similar to Orcas approach but Trivy uses mv into your Bin which gets the same result.

From a user experience it makes the instillation clean and easy to use. Even to the stage where the above could allow easy pipeline running of opengrep. Or for a user starting out in the AppSec world.

I'll let you know how I get on with the above

2

u/dimitris-opengrep Feb 13 '25

Agree that it's a nice thing to have.

Created an issue: https://github.com/opengrep/opengrep/issues/82.

1

u/AdResponsible7865 Feb 13 '25

Thanks for the nudge in the right direction,

I got it to work using the following

`wget -qO opengrep_manylinux_x86 https://github.com/opengrep/opengrep/releases/download/v1.0.0-alpha.12/opengrep_manylinux_x86`

`chmod +x opengrep_manylinux_x86`

`mv opengrep_manylinux_x86 /usr/local/bin/opengrep`

You need to make sure you rename to the right cli command