Compare commits

..

7 Commits

Author SHA1 Message Date
Asger F
ad18659373 Merge pull request #21796 from mattcosta7/patch-1
Add UseMemoDirective and UseNoMemoDirective classes
2026-06-11 23:01:29 +02:00
Matthew Costabile
923fe2dcb9 Merge branch 'main' into patch-1 2026-06-11 15:19:58 -04:00
Matthew Costabile
2884428b62 Merge branch 'main' into patch-1 2026-05-26 07:16:24 -04:00
Matthew Costabile
e10750b35e Merge branch 'main' into patch-1 2026-05-05 22:09:09 -04:00
Matthew Costabile
18550039f2 Update KnownDirective.expected 2026-05-05 11:06:40 -04:00
Matthew Costabile
0caa483925 change note and test 2026-05-05 13:20:39 +00:00
Matthew Costabile
640b17ec78 Add UseMemoDirective and UseNoMemoDirective classes 2026-05-05 07:41:36 -04:00
10 changed files with 55 additions and 17 deletions

View File

@@ -2,7 +2,7 @@
### Minor Analysis Improvements
* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, including regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a SHA-1 or SHA-256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used.
* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used.
## 0.4.36

View File

@@ -2,4 +2,4 @@
### Minor Analysis Improvements
* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, including regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a SHA-1 or SHA-256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used.
* The GitHub Actions analysis now recognizes more Bash regex checks that restrict a value to alphanumeric characters, include regexes like `^[0-9a-zA-Z]{40}([0-9a-zA-Z]{24})?$` which check for a sha1 or sha256 hash. This may reduce false positive results where command output is validated with grouped or optional alphanumeric patterns before being used.

View File

@@ -15,7 +15,7 @@
### Bug Fixes
* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on a minor point, added one more listed resource and added one more recommendation for things to check.
* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check.
## 0.6.28

View File

@@ -15,4 +15,4 @@
### Bug Fixes
* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on a minor point, added one more listed resource and added one more recommendation for things to check.
* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check.

View File

@@ -0,0 +1,4 @@
---
category: feature
---
* Added `UseMemoDirective` and `UseNoMemoDirective` classes to model the React compiler directives `"use memo"` and `"use no memo"`.

View File

@@ -435,6 +435,32 @@ module Directive {
UseClientDirective() { this.getDirectiveText() = "use client" }
}
/**
* A `use memo` directive.
*
* Example:
*
* ```
* "use memo";
* ```
*/
class UseMemoDirective extends KnownDirective {
UseMemoDirective() { this.getDirectiveText() = "use memo" }
}
/**
* A `use no memo` directive.
*
* Example:
*
* ```
* "use no memo";
* ```
*/
class UseNoMemoDirective extends KnownDirective {
UseNoMemoDirective() { this.getDirectiveText() = "use no memo" }
}
/**
* A `use cache` directive.
*

View File

@@ -3,14 +3,18 @@
| tst.js:3:1:3:9 | 'bundle'; | bundle |
| tst.js:4:1:4:13 | 'use server'; | use server |
| tst.js:5:1:5:13 | 'use client'; | use client |
| tst.js:6:1:6:12 | 'use cache'; | use cache |
| tst.js:7:1:7:20 | 'use cache: remote'; | use cache: remote |
| tst.js:8:1:8:21 | 'use ca ... ivate'; | use cache: private |
| tst.js:17:3:17:12 | 'use asm'; | use asm |
| tst.js:18:3:18:11 | 'bundle'; | bundle |
| tst.js:19:3:19:15 | 'use server'; | use server |
| tst.js:20:3:20:15 | 'use client'; | use client |
| tst.js:21:3:21:14 | 'use cache'; | use cache |
| tst.js:22:3:22:22 | 'use cache: remote'; | use cache: remote |
| tst.js:23:3:23:23 | 'use ca ... ivate'; | use cache: private |
| tst.js:30:5:30:17 | 'use strict'; | use strict |
| tst.js:6:1:6:11 | 'use memo'; | use memo |
| tst.js:7:1:7:14 | 'use no memo'; | use no memo |
| tst.js:8:1:8:12 | 'use cache'; | use cache |
| tst.js:9:1:9:20 | 'use cache: remote'; | use cache: remote |
| tst.js:10:1:10:21 | 'use ca ... ivate'; | use cache: private |
| tst.js:19:3:19:12 | 'use asm'; | use asm |
| tst.js:20:3:20:11 | 'bundle'; | bundle |
| tst.js:21:3:21:15 | 'use server'; | use server |
| tst.js:22:3:22:15 | 'use client'; | use client |
| tst.js:23:3:23:13 | 'use memo'; | use memo |
| tst.js:24:3:24:16 | 'use no memo'; | use no memo |
| tst.js:25:3:25:14 | 'use cache'; | use cache |
| tst.js:26:3:26:22 | 'use cache: remote'; | use cache: remote |
| tst.js:27:3:27:23 | 'use ca ... ivate'; | use cache: private |
| tst.js:34:5:34:17 | 'use strict'; | use strict |

View File

@@ -3,6 +3,8 @@
'bundle';// and this
'use server';
'use client';
'use memo';
'use no memo';
'use cache';
'use cache: remote';
'use cache: private';
@@ -18,6 +20,8 @@ function f() {
'bundle';
'use server';
'use client';
'use memo';
'use no memo';
'use cache';
'use cache: remote';
'use cache: private';

View File

@@ -2,7 +2,7 @@
### Minor Analysis Improvements
* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `py/clear-text-logging-sensitive-data`) may find more correct results and fewer false positive results after these changes.
* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `py/clear-text-logging-sensitive-data`) may find more correct results and less fewer positive results after these changes.
## 7.1.1

View File

@@ -2,4 +2,4 @@
### Minor Analysis Improvements
* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `py/clear-text-logging-sensitive-data`) may find more correct results and fewer false positive results after these changes.
* The sensitive data heuristics used to identify code that handles passwords and private data have been improved. Most of the changes permit more variations of established patterns, thereby finding more sensitive data. Queries that use the sensitive data library (for example `py/clear-text-logging-sensitive-data`) may find more correct results and less fewer positive results after these changes.