typetools / typetools/checker-framework

@Untainted multiplied by a constant should be @Untainted

Open
#394 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

Currently an @Untainted int multiplied by a constant is @Tainted, e.g.
"z" below is currently @Tainted

void test(@Untainted int x) {
    y = x * 10;
    String z = "test" + y;
}

Original issue reported on code.google.com by trask.st...@gmail.com on 28 Jan 2015 at 3:39

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the snippet in the issue and locating the checker implementation and tests for @Untainted arithmetic. Verify the current result for multiplying an @Untainted int by a constant, then update the behavior so the resulting value remains @Untainted and the String assignment is accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.