Skip to content

Commit fdb4362

Browse files
committed
Merge remote-tracking branch 'upstream/main' into constcrypto
2 parents 3dc35f1 + e73745d commit fdb4362

File tree

13 files changed

+97
-24
lines changed

13 files changed

+97
-24
lines changed

.vscode/tasks.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
"${input:name}",
5151
"${input:categoryQuery}"
5252
],
53+
"options": {
54+
"env": {
55+
"EDITOR": "code -r",
56+
}
57+
},
5358
"presentation": {
5459
"reveal": "never",
5560
"close": true
@@ -67,6 +72,11 @@
6772
"${input:name}",
6873
"${input:categoryLibrary}"
6974
],
75+
"options": {
76+
"env": {
77+
"EDITOR": "code -r"
78+
}
79+
},
7080
"presentation": {
7181
"reveal": "never",
7282
"close": true

actions/ql/src/change-notes/2025-02-27-immutable-actions-list.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
category: fix
33
---
44
* The `actions/unversioned-immutable-action` query will no longer report any alerts, since the
5-
Immutable Actions feature is not yet available for customer use. The query remains in the
6-
default Code Scanning suites for use internal to GitHub. Once the Immutable Actions feature is
7-
available, the query will be updated to report alerts again.
5+
Immutable Actions feature is not yet available for customer use. The query has also been moved
6+
to the experimental folder and will not be used in code scanning unless it is explicitly added
7+
to a code scanning configuration. Once the Immutable Actions feature is available, the query will
8+
be updated to report alerts again.

actions/ql/src/Security/CWE-829/UnversionedImmutableAction.ql renamed to actions/ql/src/experimental/Security/CWE-829/UnversionedImmutableAction.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @tags security
99
* actions
1010
* internal
11+
* experimental
1112
* external/cwe/cwe-829
1213
*/
1314

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Security/CWE-829/UnversionedImmutableAction.ql
1+
experimental/Security/CWE-829/UnversionedImmutableAction.ql

cpp/ql/src/Metrics/Internal/IncludeResolutionStatus.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @name Include file resolution status
3-
* @description A count of successful includes and includes that failed to resolve.
4-
* This query is for internal use only and may change without notice.
3+
* @description Counts unresolved and resolved #includes.
4+
* This query is for internal use only and may change without notice.
55
* @kind table
66
* @id cpp/include-resolution-status
77
*/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import java
2+
import semmle.code.java.dataflow.internal.SsaImpl
3+
import Impl::Consistency

java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,15 @@ private module SsaInput implements SsaImplCommon::InputSig<Location> {
168168
* Holds if the `i`th of basic block `bb` reads source variable `v`.
169169
*/
170170
predicate variableRead(BasicBlock bb, int i, SourceVariable v, boolean certain) {
171-
exists(VarRead use |
172-
v.getAnAccess() = use and bb.getNode(i) = use.getControlFlowNode() and certain = true
171+
hasDominanceInformation(bb) and
172+
(
173+
exists(VarRead use |
174+
v.getAnAccess() = use and bb.getNode(i) = use.getControlFlowNode() and certain = true
175+
)
176+
or
177+
variableCapture(v, _, bb, i) and
178+
certain = false
173179
)
174-
or
175-
variableCapture(v, _, bb, i) and
176-
certain = false
177180
}
178181
}
179182

java/ql/lib/semmle/code/java/dataflow/internal/SsaImpl.qll

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,15 @@ private module SsaInput implements SsaImplCommon::InputSig<Location> {
204204
* This includes implicit reads via calls.
205205
*/
206206
predicate variableRead(BasicBlock bb, int i, SourceVariable v, boolean certain) {
207-
exists(VarRead use |
208-
v.getAnAccess() = use and bb.getNode(i) = use.getControlFlowNode() and certain = true
207+
hasDominanceInformation(bb) and
208+
(
209+
exists(VarRead use |
210+
v.getAnAccess() = use and bb.getNode(i) = use.getControlFlowNode() and certain = true
211+
)
212+
or
213+
variableCapture(v, _, bb, i) and
214+
certain = false
209215
)
210-
or
211-
variableCapture(v, _, bb, i) and
212-
certain = false
213216
}
214217
}
215218

misc/scripts/create-change-note.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22

3-
# Creates a change note and opens it in VSCode for editing.
3+
# Creates a change note and opens it in $EDITOR (or VSCode if the environment
4+
# variable is not set) for editing.
45

56
# Expects to receive the following arguments:
67
# - What language the change note is for
@@ -51,5 +52,6 @@
5152
with open(change_note_file, "w") as f:
5253
f.write(change_note)
5354

54-
# Open the change note file in VSCode, reusing the existing window if possible
55-
os.system(f"code -r {change_note_file}")
55+
editor = os.environ.get('EDITOR', 'code -r')
56+
57+
os.system(f"{editor} {change_note_file}")

0 commit comments

Comments
 (0)