Open
Description
What happened:
I scanned an image of python, and one of the packages has a full description of the license.
here is an example:
{
"path": "/usr/local/lib/python3.9/site-packages/numpy-1.26.4.dist-info/RECORD",
"layerID": "sha256:6baba55ee976c6469c4b3b5a3c4585320bc0da3e3c9638e2169195f7243b8d03",
"accessPath": "/usr/local/lib/python3.9/site-packages/numpy-1.26.4.dist-info/RECORD",
"annotations": {
"evidence": "supporting"
}
}
],
"licenses": [
{
"value": "Copyright (c) 2005-2023, NumPy Developers.\n All rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n \n * Neither the name of the NumPy Developers nor the names of any\n contributors may be used to endorse or promote products derived\n from this software without specific prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
What you expected to happen:
In case license has \n inside of it, I think syft should trim it so it will not make the SBOM look weird.
Steps to reproduce the issue:
Here is the Dockerfile to build a sample of an image:
# Use the official Python 3.9 image from Docker Hub
FROM python:3.9
# Set the working directory in the container
WORKDIR /app
# Install the specific version of NumPy
RUN pip install numpy==1.26.4
# Specify the command to run on container start
CMD ["python"]
Anything else we need to know?:
Environment:
- Output of
syft version
: 1.9.0 - OS (e.g:
cat /etc/os-release
or similar): mac