Skip to content

fix: Resolve CodeQL code-scanning findings - #32

Merged
Hacks4Snacks merged 1 commit into
mainfrom
hacks4snacks/codescanfindings
Jul 9, 2026
Merged

Hacks4Snacks merged 1 commit into
mainfrom
hacks4snacks/codescanfindings

Conversation

@Hacks4Snacks

Copy link
Copy Markdown
Owner

fix: Resolve CodeQL code-scanning findings

}

foreach (DrawingSurfaceModel diagram in context.Model.DrawingSurfaceList)
foreach (DrawingSurfaceModel diagram in context.Model.DrawingSurfaceList.Where(diagram => diagram.ExternalInteractors().Any()))
foreach (DrawingSurfaceModel diagram in context.Model.DrawingSurfaceList)
{
foreach (Connector c in diagram.Lines.Values.OfType<Connector>())
foreach (Connector c in diagram.Lines.Values.OfType<Connector>().Where(c => diagram.TrustBoundaryCrossings(c).Any()))
}

foreach (DrawingSurfaceModel diagram in context.Model.DrawingSurfaceList)
foreach (DrawingSurfaceModel diagram in context.Model.DrawingSurfaceList.Where(diagram => diagram.TrustBoundaryBorders().Any() || diagram.TrustBoundaryLines().Any()))
private bool IsSuppressed(Message message)
{
foreach (SuppressMessage suppression in this.Suppressions)
foreach (SuppressMessage suppression in this.Suppressions.Where(suppression => suppression.IsMatch(message)))
if (File.Exists(attributesPath))
{
foreach (string line in File.ReadAllLines(attributesPath))
foreach (string trimmed in File.ReadAllLines(attributesPath)
foreach (IThreatModelFormat format in this.formats)
{
foreach (string candidate in format.Extensions)
foreach (string candidate in format.Extensions.Where(candidate => string.Equals(candidate, extension, StringComparison.OrdinalIgnoreCase)))
private static bool ContainsAny(string signal, IReadOnlyList<string> keywords)
{
foreach (string keyword in keywords)
foreach (string keyword in keywords.Where(keyword => signal.IndexOf(keyword, StringComparison.Ordinal) >= 0))

bool referencesWeakCipherRule = false;
foreach (JsonElement rule in descriptor.GetProperty("rules").EnumerateArray())
foreach (JsonElement rule in descriptor.GetProperty("rules").EnumerateArray()

bool flagsSecretbox = false;
foreach (JsonElement value in descriptor.GetProperty("flagged").EnumerateArray())
foreach (JsonElement value in descriptor.GetProperty("flagged").EnumerateArray()
private static bool HasRule(JsonElement data, string ruleId)
{
foreach (JsonElement threat in data.GetProperty("threats").EnumerateArray())
foreach (JsonElement threat in data.GetProperty("threats").EnumerateArray()
@Hacks4Snacks
Hacks4Snacks merged commit 8543825 into main Jul 9, 2026
9 checks passed
@Hacks4Snacks
Hacks4Snacks deleted the hacks4snacks/codescanfindings branch July 10, 2026 19:46
This was referenced Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants