-
Notifications
You must be signed in to change notification settings - Fork 2k
Java: CWE-378: Temp Directory Hijacking Race Condition Vulnerability #4473
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
JLLeitschuh
wants to merge
29
commits into
github:main
Choose a base branch
from
JLLeitschuh:feat/JLL/java/CWE-378
base: main
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 1 commit
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
ba727af
Java: CWE-378: Temp Directory Hijacking Race Condition Vulnerability
JLLeitschuh aea0170
Better temp file deletion and file creation tracking
JLLeitschuh 545eb2c
Fix inverted predicate logic and add additional test cases
JLLeitschuh 253c96f
Improve TempDir hijacking detection with Guard
JLLeitschuh d9d5b67
Improve warning in TempDirHijackingVulnerability
JLLeitschuh 1fc7629
Add documentation and additional test cases
JLLeitschuh b42ff13
Improve TempDirHijackingVulnerability message
JLLeitschuh 20bd05b
Add predicate handling `isDirectory` case
JLLeitschuh 442ef83
Add deleteOnExit as safe usage
JLLeitschuh fbecfdd
Start taint hijacking tracking with `java.io.tmpdir`
JLLeitschuh 8a7d64d
Refactor common logic into TempFileLib
JLLeitschuh 884db9e
Refactor more logic to TempFileLib
JLLeitschuh 6f4ed4b
Apply suggestions from code review
JLLeitschuh 03983f1
Refactor TempDirHijacking to show complete path
JLLeitschuh 37b1e1d
Update to use new getSystemProperty predicate
JLLeitschuh ac8e1cc
Add additional test cases
JLLeitschuh 84003c1
Fix some false positive paths with FlowState
JLLeitschuh 4b6d1a4
Finalize and document FlowState usage
JLLeitschuh 325d0e1
Add `NullLiteral` flow check for `File.createTempFile`
JLLeitschuh 71f5fc5
Add additional tests and better tracking of 'unsafe use'
JLLeitschuh 140c66e
Add additional tests cases for mkdir wrapper method checking
JLLeitschuh 21bef99
Add release notes
JLLeitschuh 407dd05
Rename localExprFlowPlusInitializers to localExprOrInitializerFlow
JLLeitschuh 0f5a1e7
Expand isDeleteFileExpr to include delete method wrappers
JLLeitschuh e7f016e
Apply suggestions from code review
JLLeitschuh 3a50253
Fix implicit 'this' use in TempFileLib
JLLeitschuh cd3662c
Cleanup after rebase on `main`
JLLeitschuh a2a7c73
Clean up function naming, documentation, and to some degree code with…
smowton b412c7f
Merge pull request #8 from smowton/feat/JLL/java/CWE-378
JLLeitschuh 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
Add deleteOnExit as safe usage
- Loading branch information
commit 442ef834c854ef1702745241fab88e5dca048e0f
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
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.
Uh oh!
There was an error while loading. Please reload this page.