Skip to content

Commit e16543a

Browse files
authored
Merge branch 'main' into santander-java-crypto-check
2 parents db6d3ad + 5d2ddbf commit e16543a

File tree

116 files changed

+11050
-6941
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+11050
-6941
lines changed

.github/copilot-instructions.md

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
applyTo: "**/*.expected"
3+
---
4+
Ignore these files. These are generated to be correct by running the tests, and should not be edited manually.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
applyTo: "**/*.ql,**/*.qll"
3+
---
4+
When reviewing these QL files, do not make any comment on the code itself. You don't understand the QL programming language well enough yet. You can only make comments about the following aspects:
5+
* comments (lines starting with `//` or block comments enclosed in `/* ... */`): you can suggest improvements to the clarity of comments, or point out spelling mistakes
6+
* typos in identifiers

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetCliInvoker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private ProcessStartInfo MakeDotnetStartInfo(string args, string? workingDirecto
4444
// Configure the proxy settings, if applicable.
4545
if (this.proxy != null)
4646
{
47-
logger.LogInfo($"Setting up Dependabot proxy at {this.proxy.Address}");
47+
logger.LogDebug($"Configuring environment variables for the Dependabot proxy at {this.proxy.Address}");
4848

4949
startInfo.EnvironmentVariables["HTTP_PROXY"] = this.proxy.Address;
5050
startInfo.EnvironmentVariables["HTTPS_PROXY"] = this.proxy.Address;
@@ -57,11 +57,11 @@ private ProcessStartInfo MakeDotnetStartInfo(string args, string? workingDirecto
5757
private bool RunCommandAux(string args, string? workingDirectory, out IList<string> output, bool silent)
5858
{
5959
var dirLog = string.IsNullOrWhiteSpace(workingDirectory) ? "" : $" in {workingDirectory}";
60-
logger.LogInfo($"Running '{Exec} {args}'{dirLog}");
6160
var pi = MakeDotnetStartInfo(args, workingDirectory);
6261
var threadId = Environment.CurrentManagedThreadId;
6362
void onOut(string s) => logger.Log(silent ? Severity.Debug : Severity.Info, s, threadId);
6463
void onError(string s) => logger.LogError(s, threadId);
64+
logger.LogInfo($"Running '{Exec} {args}'{dirLog}");
6565
var exitCode = pi.ReadOutput(out output, onOut, onError);
6666
if (exitCode != 0)
6767
{

csharp/extractor/Semmle.Extraction.CSharp/Entities/Locations/NonGeneratedSourceLocation.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,29 @@ public File FileEntity
4040
get;
4141
}
4242

43+
private static void WriteStarId(EscapingTextWriter writer)
44+
{
45+
writer.Write('*');
46+
}
47+
48+
public sealed override void WriteQuotedId(EscapingTextWriter writer)
49+
{
50+
if (Context.ExtractionContext.IsStandalone)
51+
{
52+
WriteStarId(writer);
53+
return;
54+
}
55+
base.WriteQuotedId(writer);
56+
}
57+
4358
public override void WriteId(EscapingTextWriter trapFile)
4459
{
60+
if (Context.ExtractionContext.IsStandalone)
61+
{
62+
WriteStarId(trapFile);
63+
return;
64+
}
65+
4566
trapFile.Write("loc,");
4667
trapFile.WriteSubId(FileEntity);
4768
trapFile.Write(',');

csharp/extractor/Semmle.Extraction.CSharp/Extractor/CompilerVersion.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ public CompilerVersion(Options options)
7474
specifiedFramework = compilerDir;
7575
}
7676

77-
var versionInfo = FileVersionInfo.GetVersionInfo(SpecifiedCompiler);
77+
// If csc is specified as compiler name, then attempt to read the version information from csc.dll
78+
var compilerBinaryName = Path.GetFileName(SpecifiedCompiler) == "csc" ? $"{SpecifiedCompiler}.dll" : SpecifiedCompiler;
79+
var versionInfo = FileVersionInfo.GetVersionInfo(File.Exists(compilerBinaryName) ? compilerBinaryName : SpecifiedCompiler);
7880
if (!knownCompilerNames.TryGetValue(versionInfo.OriginalFilename ?? string.Empty, out var vendor))
7981
{
8082
SkipExtractionBecause("the compiler name is not recognised");
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Console.WriteLine($"<arguments>{string.Join(",", args)}</arguments>");
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net10.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
</Project>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "10.0.100-rc.2.25502.107"
4+
}
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import os
2+
import runs_on
3+
4+
@runs_on.linux
5+
def test(codeql, csharp):
6+
codeql.database.create()

0 commit comments

Comments
 (0)