mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
19 lines
406 B
Plaintext
19 lines
406 B
Plaintext
/**
|
|
* @name Private access
|
|
* @description Find accesses to "private" attributes (those starting with an underscore)
|
|
* @tags access
|
|
* private
|
|
*/
|
|
|
|
import python
|
|
|
|
predicate is_private(Attribute a) {
|
|
a.getName().matches("\\_%") and
|
|
not a.getName().matches("\\_\\_%\\_\\_")
|
|
}
|
|
|
|
from Attribute access
|
|
where is_private(access) and
|
|
not access.getObject().(Name).getId() = "self"
|
|
select access
|