Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java: Avoid low-confidence dispatch to InputStream methods #13769

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

atorralba
Copy link
Contributor

@atorralba atorralba commented Jul 19, 2023

Adds java.io.InputStream as a valid target class for low-confidence dispatch consideration.

Also adds a summary model for InputStream.read(), which offers a high-confidence alternative for this method.

Also adds a neutral model for `InputStream.read`, which offers a high-confidence alternative for this method.
@@ -116,6 +116,7 @@ extensions:
- ["java.io", "File", "isDirectory", "()", "summary", "manual"]
- ["java.io", "File", "mkdirs", "()", "summary", "manual"]
- ["java.io", "FileInputStream", "FileInputStream", "(File)", "summary", "manual"]
- ["java.io", "InputStream", "read", "()", "summary", "manual"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a taint step from Argument[this] to ReturnValue? IIRC we've defaulted to having small bit-width apis that are technically taint-propagating as taint steps and then rule them out with type-based barriers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be my preferred solution, indeed! But I seemed to remember we had agreed on the contrary 😅. Happy to change it to a summary! See 29543f5.

@github-actions
Copy link
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

java

Generated file changes for java

  • Changes to framework-coverage-java.rst:
-    Java Standard Library,``java.*``,3,688,205,80,,9,,,18
+    Java Standard Library,``java.*``,3,689,205,80,,9,,,18
-    Totals,,283,13606,2067,290,16,122,33,1,391
+    Totals,,283,13607,2067,290,16,122,33,1,391
  • Changes to framework-coverage-java.csv:
- java.io,50,,45,,,22,,,,,,,,,,,,,,28,,,,,,,,,,,,,,,,,,,43,2
+ java.io,50,,46,,,22,,,,,,,,,,,,,,28,,,,,,,,,,,,,,,,,,,44,2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants