Skip to content

fix errors when scanning broken symlink - #21

Merged
ntoskernel merged 2 commits into
ntoskernel:2.1-devfrom
Antiksec:main
Sep 15, 2026
Merged

ntoskernel merged 2 commits into
ntoskernel:2.1-devfrom
Antiksec:main

Conversation

@Antiksec

Copy link
Copy Markdown

Issue: DeepSecrets crashes on broken symlinks in the scanned directory

When a directory contains broken symlinks, DeepSecrets fails with an error during the file listing stage. This has become especially noticeable now that many projects include agent-related directories (e.g. .claude or similar), which frequently accumulate broken symlinks.

The crash occurs in iscan_mode.py → _get_files_list() → _size_check():

python
size = os.path.getsize(path)
os.path.getsize() raises FileNotFoundError (via OSError) when the target of a symlink no longer exists, which aborts the entire scan.

Manually adding such directories to excluded_paths avoids the crash, but this is not a proper fix — the scan should not fail just because a broken symlink is present.

@ntoskernel
ntoskernel changed the base branch from main to 2.1-dev September 15, 2026 07:17
@ntoskernel

Copy link
Copy Markdown
Owner

Hi! Thanks for the fix.
I would accept it into the dev branch, polish some details and release as 1.2.1 asap.

@ntoskernel
ntoskernel merged commit 346e20c into ntoskernel:2.1-dev Sep 15, 2026
1 check passed
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