Skip to content

Bump 1.3.0 and reduce scanner false positives#6

Merged
CodeforGood1 merged 1 commit into
CodeforGood1:mainfrom
Blackplane-Systems:main
May 11, 2026
Merged

Bump 1.3.0 and reduce scanner false positives#6
CodeforGood1 merged 1 commit into
CodeforGood1:mainfrom
Blackplane-Systems:main

Conversation

@CodeforGood1
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 11, 2026 18:54
@CodeforGood1 CodeforGood1 merged commit cac0ae8 into CodeforGood1:main May 11, 2026
5 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR bumps ContractGuard to version 1.3.0 across the Python package and VS Code extension, and aims to reduce scanner false positives by skipping common build/vendor directories and suppressing some IP-address PII matches.

Changes:

  • Add a shared should_skip_path() helper and use it in the Secrets and PII analyzers’ file-loading logic.
  • Reduce PII false positives by skipping loopback/unspecified/reserved IP address matches.
  • Bump version strings to 1.3.0 in Python packaging and VS Code extension metadata/scripts.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/contractguard/analyzers/secrets_analyzer.py Skip scanning files under excluded paths during secrets file loading.
src/contractguard/analyzers/pii_analyzer.py Skip excluded paths during PII file loading; suppress select IP matches via _is_non_personal_ip.
src/contractguard/analyzers/file_filters.py Introduce shared directory-skip helper for analyzers.
src/contractguard/init.py Bump core package version to 1.3.0.
pyproject.toml Bump Python package version to 1.3.0.
package.json Bump VS Code extension version and packaging output filename to 1.3.0.
package-lock.json Align lockfile root version to 1.3.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +22 to +25


def should_skip_path(path: Path) -> bool:
return any(part in _SKIP_DIRS for part in path.parts)
Comment on lines 117 to 120
if path.is_dir():
for f in sorted(path.rglob("*")):
if f.is_file() and f.suffix.lower() not in _SKIP_EXTENSIONS:
if f.is_file() and f.suffix.lower() not in _SKIP_EXTENSIONS and not should_skip_path(f):
try:
Comment on lines 111 to 114
if path.is_dir():
for f in sorted(path.rglob("*")):
if f.is_file() and f.suffix.lower() not in _skip:
if f.is_file() and f.suffix.lower() not in _skip and not should_skip_path(f):
try:
Comment on lines 70 to +73
matched = match.group(0)
if pii_name == "ip_address" and _is_non_personal_ip(matched):
continue
facts["pii_count"] += 1
ip_value = ipaddress.ip_address(value)
except ValueError:
return False
return ip_value.is_loopback or ip_value.is_unspecified or ip_value.is_reserved
Comment on lines 111 to 114
if path.is_dir():
for f in sorted(path.rglob("*")):
if f.is_file() and f.suffix.lower() not in _skip:
if f.is_file() and f.suffix.lower() not in _skip and not should_skip_path(f):
try:
Comment on lines 117 to 120
if path.is_dir():
for f in sorted(path.rglob("*")):
if f.is_file() and f.suffix.lower() not in _SKIP_EXTENSIONS:
if f.is_file() and f.suffix.lower() not in _SKIP_EXTENSIONS and not should_skip_path(f):
try:
Comment on lines 70 to +73
matched = match.group(0)
if pii_name == "ip_address" and _is_non_personal_ip(matched):
continue
facts["pii_count"] += 1
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