Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Stat path to check it is a file
  • Loading branch information
mbg committed Jul 14, 2026
commit f4c56016f36445db97d96fa4018041e5c114b72e
2 changes: 1 addition & 1 deletion lib/entry-points.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/config-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,10 @@ export async function loadUserConfig(
const workspaceRelative = isWorkspaceRelative(localFilePath);

// If the path is relative to the workspace and the file exists, then we use it.
if (workspaceRelative && fs.existsSync(localFilePath)) {
if (
workspaceRelative &&
fs.statSync(localFilePath, { throwIfNoEntry: false })?.isFile()
) {
configFile = localFilePath;
localFile = true;
Comment on lines +512 to +518

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For backwards-compatibility reasons, we cannot rely on local paths starting with ./. Adding such a requirement would break existing configurations.

That said, I am also not convinced that this is a real concern. While an analysis may end up using a local configuration file in a PR branch, rather than a remote one that was intended, this would be very obvious.

Currently, the same thing could be done in any repository that uses a custom workflow by changing the configuration file in the repo, adding one and setting config-file, or setting the config input.

} else {
Expand Down
Loading