forked from openjdk/jdk
-
Notifications
You must be signed in to change notification settings - Fork 39
Added confidential checker JDK annotations #224
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
Open
iywang2016
wants to merge
49
commits into
typetools:master
Choose a base branch
from
iywang2016:iywang
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
4c348b7
Added Confidential annotations for JDK
iywang2016 7e5c991
Added poly annotation for Throwable.getMessage
iywang2016 de7a3e3
Added poly annotation for Throwable.getMessage
iywang2016 a7c4ce5
Added poly annotation for Throwable.getMessage
iywang2016 609e7f9
Removed poly annotation for Throwable.getMessage
iywang2016 6571e19
Added unknown annotation for Throwable.getMessage
iywang2016 c4446dd
Removed poly annotation for Throwable.getMessage
iywang2016 ba581d7
Removed annotations for Throwable.getMessage
iywang2016 44a7f6f
Added annotations for Throwable.getMessage
iywang2016 fcf2f72
Make return type of `Throwable.getMessage()` explicit
mernst a0cb29e
Added UnknownConfidential annotation to Stream.collect()
iywang2016 efff74e
Added UnknownConfidential annotation to String.java
iywang2016 cc3be97
Added PolyConfidential annotation to String.format
iywang2016 241b62a
Added UnknownConfidential annotation to String.equals
iywang2016 a185307
Added PolyConfidential annotation to String.equals, Stream.collect, O…
iywang2016 99f8297
Added PolyConfidential annotation to Exception constructors and Throw…
iywang2016 7c225e5
Added PolyConfidential annotations
iywang2016 4b26da2
Merge ../jdk-branch-master into iywang
mernst 6552483
Confidential overloads of toString
iywang2016 184a9d9
Merge remote-tracking branch 'origin/iywang' into iywang
iywang2016 20ac8d6
Add missing import
mernst 15bd2ee
Sort imports
mernst b708411
Add export
mernst 7e5fea0
Sort imports
mernst fc1e64a
Removed wildcard import and added missing import
iywang2016 c24d49e
Merge ../jdk-branch-master into iywang
mernst e6bc011
Export SQL Quotes qualifiers
mernst 8a46e4e
Add qualifiers
mernst 582cabe
Merge ../jdk-branch-master into iywang
mernst fc39596
Add `import` statement
mernst 0b0b8ec
Revised Object.toString to use poly annotations
iywang2016 a8445da
Added qualifiers
iywang2016 46a544e
Merge remote-tracking branch 'origin/iywang' into iywang
iywang2016 1a0eb4a
Revised Object toString to use PolyConfidential
iywang2016 e4905a0
Revised Object toString to use PolyConfidential parameter and Confide…
iywang2016 923d35e
Revised typo
iywang2016 c00cd20
Revising generics default
iywang2016 c0dbab2
Added NonConfidential to getClass return
iywang2016 10311d6
Added DefaultFor to NonConfidential
iywang2016 d2aaf4f
Revised DefaultFor in NonConfidential
iywang2016 6a5df67
Removed PolyConfidential receiver annotation for toString
iywang2016 e6ac40f
Added back PolyConfidential receiver annotation for toString
iywang2016 be75381
Added PolyConfidential annotation to Optional type
iywang2016 92d3af5
Changed PolyConfidential to top type
iywang2016 eb7ea2f
Merge ../jdk-branch-master into iywang
mernst 13f944c
Merge ../jdk-branch-master into iywang
mernst 1bcdeb9
Merge ../jdk-fork-typetools into iywang
mernst 264f63c
Expand permitted type arguments to `Optional`
mernst 0388e83
Merge ../jdk-fork-typetools into iywang
mernst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: typetools/jdk
Length of output: 36660
🏁 Script executed:
Repository: typetools/jdk
Length of output: 6726
🏁 Script executed:
Repository: typetools/jdk
Length of output: 4428
🏁 Script executed:
# Check ReflectiveOperationException as well cat -n src/java.base/share/classes/java/lang/ReflectiveOperationException.javaRepository: typetools/jdk
Length of output: 4257
LGTM!
@PolyConfidentialannotations properly added to Exception constructors.The annotations enable confidentiality tracking through the exception hierarchy. The
@PolyConfidentialqualifier onmessageandcauseparameters allows the checker to track whether exceptions contain confidential data.However,
IOException(which extendsException) and other subclasses lack corresponding@PolyConfidentialannotations on their constructors. WhenIOExceptioncallssuper(message), it passes a plainStringwhereExceptionexpects@PolyConfidential String, breaking the type contract. UpdateIOException,ReflectiveOperationException, and otherExceptionsubclasses to include@PolyConfidentialannotations and add"confidential"to their@AnnotatedFordeclarations.🤖 Prompt for AI Agents