GithubHelp home page GithubHelp logo

Comments (7)

mschwager avatar mschwager commented on July 30, 2024 1

From @mjambon:

the ocaml executables (semgrep-core and spacegrep) are compiled statically for linux but only "partially statically" for darwin i.e. only the libc is dynamically linked but the third-party libraries that we use are linked in statically.

I believe this means we can in fact simplify things by removing the PRECOMPILED_LOCATION, COPY --from=semgrep, and FROM ... AS semgrep from https://github.com/returntocorp/semgrep-action/blob/develop/Dockerfile.

cc @chmccreery who could do this with the v0.36.0 update, or we could do this separately.

from semgrep-action.

mschwager avatar mschwager commented on July 30, 2024

Looks like PRECOMPILED_LOCATION has been gone since semgrep/semgrep@4e97e83, which was included in the v0.31.0 release. Unless there's a specific reason for avoiding the binaries in the package I believe we simply remove the PRECOMPILED_LOCATION variable.

Is there a reason we were pulling the binaries from a separate Docker image rather than the Python package? If we can remove the PRECOMPILED_LOCATION I suspect we can remove the COPY --from=semgrep /usr/local/bin/semgrep-core /tmp/semgrep-core and FROM returntocorp/semgrep:0.35.0@sha256:... AS semgrep from the Dockerfile as well.

from semgrep-action.

underyx avatar underyx commented on July 30, 2024

Is there a reason we were pulling the binaries from a separate Docker image rather than the Python package?

The python binaries don't work on alpine.

from semgrep-action.

mschwager avatar mschwager commented on July 30, 2024

Oh I see, it's because we're using Alpine. We could probably make our lives a lot easier by using python:3.7-slim instead of python:3.7-alpine. Regardless, I wonder how its continued with work without PRECOMPILED_LOCATION 🤷‍♂️

from semgrep-action.

chmccreery avatar chmccreery commented on July 30, 2024

@mschwager let's do this separately. Let me know if you want to do it before this release, or if we can do it later this week.

from semgrep-action.

brendongo avatar brendongo commented on July 30, 2024

I think it's continued to work without PRECOMPILED_LOCATION because pipx install semgrep just works as expected comes with the spacegrep and semgrep binaries.

from semgrep-action.

mschwager avatar mschwager commented on July 30, 2024

Fixed by https://github.com/returntocorp/semgrep-action/pull/156.

from semgrep-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.