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

grype v0.64.0 template zeroes the template content #1388

Closed
abg opened this issue Jul 14, 2023 · 1 comment · Fixed by #1391
Closed

grype v0.64.0 template zeroes the template content #1388

abg opened this issue Jul 14, 2023 · 1 comment · Fixed by #1391
Assignees
Labels
bug Something isn't working

Comments

@abg
Copy link

abg commented Jul 14, 2023

What happened:

Running grype v0.64.0 with grype -o template -t my.tmpl zeros out my template file.

What you expected to happen:

Expected template to be read and templated output emitted similar to earlier to releases.

How to reproduce it (as minimally and precisely as possible):

# curl -Ls 'https://github.com/anchore/grype/raw/main/templates/table.tmpl' > table.tmpl
# ls -lah table.tmpl
-rw-r--r-- 1 root root 2.9K Jul 14 03:29 table.tmpl
# grype --quiet -o template -t table.tmpl dir:.
# ls -lah table.tmpl
-rw-r--r-- 1 root root 0 Jul 14 03:27 table.tmpl

Anything else we need to know?:

grype v0.63.1 seems to work with templates. This change seems related to #1346

Environment:

  • Output of grype version:
# grype version
Application:          grype
Version:              0.64.0
Syft Version:         v0.85.0
BuildDate:            2023-07-13T15:19:47Z
GitCommit:            37f436cfb6eb871bfde9cfcb1a360c510751afc9
GitDescription:       v0.64.0
Platform:             linux/amd64
GoVersion:            go1.19.10
Compiler:             gc
Supported DB Schema:  5
  • OS (e.g: cat /etc/os-release or similar):
# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
@abg abg added the bug Something isn't working label Jul 14, 2023
heubeck added a commit to MediaMarktSaturn/technolinator that referenced this issue Jul 14, 2023
@willmurphyscode willmurphyscode self-assigned this Jul 17, 2023
@willmurphyscode
Copy link
Contributor

Thanks for the bug report @abg! I've reproduced the issue locally and am working on a fix.

@github-project-automation github-project-automation bot moved this to Done in OSS Jul 17, 2023
@willmurphyscode willmurphyscode added changelog-ignore Don't include this issue in the release changelog bug Something isn't working and removed bug Something isn't working changelog-ignore Don't include this issue in the release changelog labels Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants