Skip to content

Conversation

@northdpole
Copy link
Contributor

No description provided.

"time"

"github.com/go-errors/errors"

Choose a reason for hiding this comment

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

Extra empty line here

)

func main() {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)

Choose a reason for hiding this comment

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

Is 1 minute timeout a bit aggressive here?

return errors.Errorf("could not create transformer: %w", err)
}

if err := component.RunScanner(ctx, ocsfTransformer, opts...); err != nil {

Choose a reason for hiding this comment

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

I'd just pass component.RunnerWithComponentName("semgrep") and delete opts here as we're only using what I mentioned and not extending it

- --all-projects
- --json-file-output={{scratchWorkspace}}/snyk-sbom.out
- "{{sourceCodeWorkspace}}/"
- name: upload-sbom-to-dependency-track

Choose a reason for hiding this comment

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

We already have a dependency track reporter, why do we want to do this bit?

rawOutFilePath, err := env.GetOrDefault(
"RAW_OUT_FILE_PATH",
"",
env.WithDefaultOnError(false),

Choose a reason for hiding this comment

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

If env.WithDefaultOnError(false) is false you can omit it as it's the default

@@ -0,0 +1,6 @@
package ptr

Choose a reason for hiding this comment

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

There's a utility for this in smithy/pkg/utils


# Set working directory
WORKDIR /app
COPY ./entrypoint.sh /exit_0_with_vulns.sh

Choose a reason for hiding this comment

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

Where's the entrypoint specified here?

RUN chmod +x /exit_0_with_vulns.sh

# Create a script to handle architecture detection and binary download
RUN echo '#!/bin/bash \n\

Choose a reason for hiding this comment

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

Not sure why we need this bit

@@ -0,0 +1,154 @@
# Start with a base image

Choose a reason for hiding this comment

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

Is there a ready image for this? It looks a little overkill to having to bake this

@@ -0,0 +1,5 @@
description: Snyk based workflow

Choose a reason for hiding this comment

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

Did you test this bit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants