Skip to content

examples/docker/kafka-oauth-strimzi/kafka/oauth.sh:101:44: warning[SC2050]: This expression is constant. Did you forget the $ on a variable? #240

@k-wall

Description

@k-wall

if [ "$SCOPES" == "" ] && [ DEFAULT_SCOPES != "" ]; then

Snyk noticed this error, which does indeed look like a true positive.

Error: SHELLCHECK_WARNING (CWE-398):
examples/docker/kafka-oauth-strimzi/kafka/oauth.sh:101:44: warning[SC2050]: This expression is constant. Did you forget the $ on a variable?
#   99|   fi
#  100|   
#  101|-> if [ "$SCOPES" == "" ] && [ DEFAULT_SCOPES != "" ]; then
#  102|       [ "$QUIET" == "" ] && >&2 echo "SCOPES not set. Using default value: ${DEFAULT_SCOPES}"
#  103|       SCOPES="${DEFAULT_SCOPES}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions