Coder Social home page Coder Social logo

Scan Directory: Add (git) version about grype HOT 2 OPEN

lclc avatar lclc commented on June 1, 2024
Scan Directory: Add (git) version

from grype.

Comments (2)

tgerla avatar tgerla commented on June 1, 2024

Hi @lclc, thanks for the issue. We think this idea makes sense. There is a workaround that you could use to inject some arbitrary information into your Grype result right now, using the --name option. For instance, using a subshell to call git:

grype --name `git describe --tags --abbrev=0` . -o json

The value passed in using --name will be accessible in the template using {{ .Descriptor.Configuration.Name }}

Two notes: currently the --name value ends up in Descriptor.Configuration.Name which is not the right place -- it will move to a different path soon, when we fix that bug. We will also be changing --name to --source-name and adding --source-version to match Syft. Once those changes are made, --source-version will probably be the right place to inject this info.

We've got a couple of other issues that we will link to this one--stay tuned!

from grype.

tgerla avatar tgerla commented on June 1, 2024

Here is a feature request for Syft related to this request: anchore/syft#2898

from grype.

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.