Skip to content

Commit

Permalink
Merge pull request #228 from interlynk-io/fix/quality
Browse files Browse the repository at this point in the history
Fix/quality
  • Loading branch information
riteshnoronha committed Apr 19, 2024
2 parents d42295e + 01982e1 commit 9576aba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit 9576aba

Please sign in to comment.