Docker run doesn't recognize the token
0GiS0 opened this issue · comments
Hi all!
I'm trying to scan a .NET project but sast-scanner requires the token for that. If I choose sl it works perfectly:
export SHIFTLEFT_ACCESS_TOKEN=$SL_TOKEN
sl analyze --app shiftleft-csharp-demo --csharp --wait netcoreWebapi.csproj
But If I try to use the container It seems It doesn't receive the token in the env that It expects:
docker run --rm -e "WORKSPACE=${PWD}" -e SHIFTLEFT_ACCESS_TOKEN="$SL_TOKEN" -v $PWD:/app shiftleft/scan scan --src /app --out_dir /app/reports
![image](https://private-user-images.githubusercontent.com/175379/273548234-fa8a8954-c79e-4e67-b0d9-3df1ca673cc3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDUzMzgyOTksIm5iZiI6MTcwNTMzNzk5OSwicGF0aCI6Ii8xNzUzNzkvMjczNTQ4MjM0LWZhOGE4OTU0LWM3OWUtNGU2Ny1iMGQ5LTNkZjFjYTY3M2NjMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwMTE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDExNVQxNjU5NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iM2I0ZTgwMjE0MjAzZTU1ZDNkOWJkZTk4ODZlZjY3MTNkMGUzM2ZkNTMzNTI3MjdiYzhiYjJlYmZiMTU5MzhiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.YPd94Mq3GQkg7tU7DoF2oxhpBRVgzsMPNvd67ozLevk)
Any thoughts?
Thank you so much!!
Try also setting the SHIFTLEFT_ORG_ID
environment variable to your organization ID, then it should proceed further.
Are you interested in the specific output of this tool? sl
is generally better supported.