You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while running tern on container image with alpine base image seeing following errors
Layer 2:
info: Layer created by commands: /bin/sh -c apk add --no-cache openjdk17
info: Retrieved package metadata using apk default method.
error: /bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
File licenses found in Layer: None
Packages found in Layer: None
To Reproduce
Steps to reproduce the behavior:
run tern scan from docker image (ternd report -w test.tar -o test.txt)
seeing this error
2023-04-28 12:56:09,110 - ERROR - rootfs - Command failed. /bin/sh: export: line 0: JAVA_OPTS:: bad variable name
for image layer1 the output is clean
Layer 1:
info: Layer created by commands: /bin/sh -c #(nop) ADD file:9a4f77dfaba7fd2aa78186e4ef0e7486ad55101cefc1fabbc1b385601bb38920 in /
info: Found 'Alpine Linux v3.17' in /etc/os-release.
info: Retrieved package metadata using apk default method.
Layer 2:
info: Layer created by commands: /bin/sh -c apk add --no-cache openjdk17
info: Retrieved package metadata using apk default method.
error: /bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
File licenses found in Layer: None
Packages found in Layer: None
Hi @dnelaturi, thanks for the issue! Can you please provide the Dockerfile for your image so I may debug? From what I can see this is not an issue with the Alpine base image. Rather, I suspect there is some type of unique line in the Dockerfile that Tern's parser does not recognize or an environment variable that Tern cannot properly export, hence the /bin/sh: export: line 0: JAVA_OPTS:: bad variable name error that is throwing off the results.
while running tern on container image with alpine base image seeing following errors
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
To Reproduce
Steps to reproduce the behavior:
run tern scan from docker image (ternd report -w test.tar -o test.txt)
seeing this error
2023-04-28 12:56:09,110 - ERROR - rootfs - Command failed. /bin/sh: export: line 0: JAVA_OPTS:: bad variable name
for image layer1 the output is clean
Layer 1:
info: Layer created by commands: /bin/sh -c #(nop) ADD file:9a4f77dfaba7fd2aa78186e4ef0e7486ad55101cefc1fabbc1b385601bb38920 in /
info: Found 'Alpine Linux v3.17' in /etc/os-release.
info: Retrieved package metadata using apk default method.
subsequent layers it doesn't show the correct results
=======================================================================================
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
/bin/sh: export: line 0: JAVA_OPTS:: bad variable name
=======================================================================================
Expected behavior
Expected to see the results without errors.
Environment you are running Tern on
Enter all that apply
Tern version 2.12.0
python version = 3.9.16 (main, Apr 12 2023, 07:00:42)
Ubuntu
Please attach files if they exist
The text was updated successfully, but these errors were encountered: