Comments (4)
Hi @Joerki -- I'm a bit confused what the problem is. I see search-remote-licenses
is set to false, which is the default and I don't see this being set by an environment variable, so it's expected to be false. The default local-mod-cache-dir
is based on your home directory, which is also expected. Could you elaborate on your configuration and the problem a bit to help me understand?
from syft.
Hi @kzantow ,
I changed the inspection and updated the description.
I hope you can reproduce the problem.
BR,
Jörg
from syft.
Hi @kzantow ,
now I can describe the exact problem after I debug it properly.
Syft assumes that Go is installed on the machine when Go binaries are inspected. But this is a wrong assumption.
I modified HOME in the environment (to simulate that I do not have go on my machine).
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "cmd/syft/main.go",
"args": ["scan", "mongo:5.0.26-focal", "-o", "syft-json=/home/joerg/projects/mongo_inspect/mongo-syft-single.json", "-vv"],
"env": { "HOME": "/home/joerg/projects/mongo_inspect/temp", "GOPATH": "", "SYFT_GOLANG_SEARCH_REMOTE_LICENSES": "true" }
}
]
}
Please look here:
syft/pkg/cataloger/golang/licenses.go
func modCacheResolver
Syft appended "go/pkg/mod" to my HOME path. This is the content of my modCacheDir
parameter.
My $HOME exists, but not $HOME/go/pkg/mod.
The result is that the path is not found (a trace method is written, not a trace for me, the problem should be much more obvious), and an empty fileresolver is created. So downloaded licenses go to nowhere.
My temporary workaround in the pipeline will be hopefully the creation of $HOME/go/pkg/mod directory.
But Syft has to use a directory where packages can be written to and analysed.
BR,
Jörg
from syft.
I can confirm that my temporary solution - the creation of $HOME/go/pkg/mod before Syft invocation - is working.
from syft.
Related Issues (20)
- Regression in 1.1 cataloging openjdk: generates version containing a null byte HOT 13
- Syft reports some fw* pckages, which are nowhere to find HOT 4
- Add support for dnf packages HOT 1
- Support Swift Package Manager Package.resolved schema version 3 HOT 2
- Catalog TiDB binary
- Redis not listed in the artifact lists of the bitnami/redis image HOT 2
- License not pickedup for binaries like java (openjdk), node (nodejs) HOT 4
- Ignore Go compiler affecting CVE when Docker image only contains a binary compiled with Go HOT 2
- Pom parser not resolving all dependency versions
- SBOM is generated with empty name HOT 4
- components inside tar.gz / tgz not picked up HOT 2
- Clearly document the fact that CPE strings could be made up HOT 1
- Recognition of files in a folder works inconsistently between Linux distributions. HOT 1
- New version 1.3.0 leads to "too many open files" while scanning bigger images HOT 1
- Add `bun-lock-cataloger` & `bun-binary-cataloger` catalogers HOT 1
- Improve linting for `defer Close` type issues HOT 2
- Binary copied to image omitted from SBOM HOT 4
- Relationships / Dependencies are present in Syft json and SPDX json files but not in Cyclonedx json file format HOT 3
- Not all the packages are getting imported in Blackduck scanner HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from syft.