Skip to content

Commit

Permalink
Add hardwareConcurrency codeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi committed Jul 31, 2024
1 parent be37440 commit 7ff0e44
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ paths:
- src
- modules
- libraries
queries:
- name: Prebid queries
uses: ./.github/codeql/queries
15 changes: 15 additions & 0 deletions .github/codeql/queries/hardwareConcurrency.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* @id prebid/hardware-concurrency
* @name hardwareConcurrency
* @kind problem
* @problem.severity warning
* @description Finds uses of hardwareConcurrency
*/

import javascript

from DataFlow::SourceNode nav
where
nav = DataFlow::globalVarRef("navigator") or
nav = DataFlow::globalVarRef("top").getAPropertyRead("navigator")
select nav.getAPropertyRead("hardwareConcurrency"), "hardwareConcurrency is an indicator of fingerprinting"
8 changes: 8 additions & 0 deletions .github/codeql/queries/qlpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
library: false
warnOnImplicitThis: false
name: queries
version: 0.0.1
dependencies:
codeql/javascript-all: ^1.1.1
codeql/javascript-queries: ^1.1.0

0 comments on commit 7ff0e44

Please sign in to comment.