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

Fix/quality #228

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM golang:1.20-alpine AS builder
FROM golang:1.22.2-alpine AS builder
LABEL org.opencontainers.image.source="https://github.com/interlynk-io/sbomqs"

RUN apk add --no-cache make git
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .

RUN make ; make build

FROM scratch
Expand All @@ -17,4 +18,4 @@ LABEL org.opencontainers.image.licenses=Apache-2.0
COPY --from=builder /app/build/sbomqs /app/sbomqs
ENV INTERLYNK_DISABLE_VERSION_CHECK=true

ENTRYPOINT [ "/app/sbomqs" ]
ENTRYPOINT [ "/app/sbomqs" ]
4 changes: 3 additions & 1 deletion pkg/sbom/spdx.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ func (s *spdxDoc) parseComps() {
nc.supplier = *supp
}
nc.supplierName = s.addSupplierName(index)
nc.sourceCodeHash = sc.PackageVerificationCode.Value
if sc.PackageOriginator != nil {
nc.sourceCodeHash = sc.PackageVerificationCode.Value
}

//nc.sourceCodeUrl //no conlusive way to get this from SPDX
if strings.ToLower(sc.PackageDownloadLocation) == "noassertion" || strings.ToLower(sc.PackageDownloadLocation) == "none" {
Expand Down