Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core-open/scanners/dart-scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function parsePubspecYaml(content: string): {
// (SDK dependencies inside dependency sections) cannot clobber the
// environment constraint.
if (trimmed.startsWith('sdk:')) {
const match = trimmed.match(/sdk:\s*['"]?>?=?\s*(\d[^<'"]*)/);
const match = trimmed.match(/sdk:\s*['"]?>?=?\s*[~^]?(\d[^<'"]*)/);
if (match) dartVersion = match[1]!.trim();
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core-open/scanners/docker-scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function parseDockerfile(filePath: string, cache?: FileCache): Promise<Doc

// Match FROM statements (including multi-stage builds)
// FROM [--platform=<platform>] <image>[:<tag>] [AS <name>]
const fromRegex = /^FROM\s+(?:--platform=[^\s]+\s+)?([^\s]+)/gm;
const fromRegex = /^\s*FROM\s+(?:--platform=[^\s]+\s+)?([^\s]+)/gim;
let match: RegExpExecArray | null;

while ((match = fromRegex.exec(content)) !== null) {
Expand Down
Loading