mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Cleanup after code review feedback
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
import semmle.code.java.Type
|
||||
private import semmle.code.java.dataflow.FlowSteps
|
||||
|
||||
library class TypeProperty extends Class {
|
||||
class TypeProperty extends Class {
|
||||
TypeProperty() { hasQualifiedName("java.util", "Properties") }
|
||||
}
|
||||
|
||||
library class PropertiesGetPropertyMethod extends ValuePreservingMethod {
|
||||
class PropertiesGetPropertyMethod extends ValuePreservingMethod {
|
||||
PropertiesGetPropertyMethod() {
|
||||
getDeclaringType() instanceof TypeProperty and
|
||||
hasName("getProperty")
|
||||
@@ -15,21 +15,21 @@ library class PropertiesGetPropertyMethod extends ValuePreservingMethod {
|
||||
override predicate returnsValue(int arg) { arg = 1 }
|
||||
}
|
||||
|
||||
library class PropertiesGetMethod extends Method {
|
||||
class PropertiesGetMethod extends Method {
|
||||
PropertiesGetMethod() {
|
||||
getDeclaringType() instanceof TypeProperty and
|
||||
hasName("get")
|
||||
}
|
||||
}
|
||||
|
||||
library class PropertiesSetPropertyMethod extends Method {
|
||||
class PropertiesSetPropertyMethod extends Method {
|
||||
PropertiesSetPropertyMethod() {
|
||||
getDeclaringType() instanceof TypeProperty and
|
||||
hasName("setProperty")
|
||||
}
|
||||
}
|
||||
|
||||
library class PropertiesStoreMethod extends Method {
|
||||
class PropertiesStoreMethod extends Method {
|
||||
PropertiesStoreMethod() {
|
||||
getDeclaringType() instanceof TypeProperty and
|
||||
(getName().matches("store%") or getName() = "save")
|
||||
|
||||
@@ -4,5 +4,5 @@ category: minorAnalysis
|
||||
* Add new guards `IsWindowsGuard`, `IsSpecificWindowsVariant`, `IsUnixGuard`, and `IsSpecificUnixVariant` to detect OS specific guards.
|
||||
* Add new predicate `getSystemProperty` that gets all expressions that retrieve system properties from a variety of sources (eg. alternative JDK API's, Google Guava, Apache Commons, Apache IO, ect..).
|
||||
* Update "Local information disclosure in a temporary directory" (`java/local-temp-file-or-directory-information-disclosure`) to remove false-positives when OS is properly used as logical guard.
|
||||
* Update "Local information disclosure in a temporary directory" (`java/local-temp-file-or-directory-information-disclosure`) to use `getSystemProperty` to resolve more
|
||||
* Update "Local information disclosure in a temporary directory" (`java/local-temp-file-or-directory-information-disclosure`) to use `getSystemProperty` to use new `getSystemProperty` predicate.
|
||||
|
||||
Reference in New Issue
Block a user