Skip to content

False positive: dangerous-write triggers when the write value is a literal #30

@johnbillion

Description

@johnbillion

Example:

run: |
  if git diff --quiet; then
    echo "uncommitted_changes=false" >> "$GITHUB_OUTPUT"
  else
    echo "uncommitted_changes=true" >> "$GITHUB_OUTPUT"
  fi

Octoscan incorrectly flags the lines that write to $GITHUB_OUTPUT as having a dangerous write, but they don't because they are not writing a variable, they are writing a string literal.

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