Skip to content

Add SonarQube/Codacy conventions and harden network security#121

Merged
JE-Chen merged 3 commits intomainfrom
dev
Apr 18, 2026
Merged

Add SonarQube/Codacy conventions and harden network security#121
JE-Chen merged 3 commits intomainfrom
dev

Conversation

@JE-Chen
Copy link
Copy Markdown
Member

@JE-Chen JE-Chen commented Apr 18, 2026

Summary

  • Add SonarQube/Codacy code-quality conventions to CLAUDE.md (complexity/size caps, exception handling, Pythonic rules, naming, duplication, logging/assert, hardcoded values, boolean hygiene, imports)
  • Fix silent except Exception: pass in diagram_scene.py — now catches (ImageDownloadError, OSError) and logs via pybreeze_logger.debug
  • Harden SSH/API network layer (from prior commit on branch): URL validation, timeouts, redirect protection, TLS defaults; bumps version to 1.0.19

Test plan

  • python -m pytest test/test_utils/ -v
  • python -m pybreeze launches without regression
  • Diagram editor image URL load path still works (and silently-failed URLs now appear in debug log)
  • SSH / AI code review HTTP flows still succeed against valid endpoints

JE-Chen added 2 commits April 18, 2026 00:31
Add shared URL validation helper (pybreeze/utils/network), route
AI code review and diagram download through it, disable redirect
following on requests.*, switch SSH/SFTP to WarningPolicy with
system host keys, and expand CLAUDE.md security checklist.
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 18, 2026

Not up to standards ⛔

🔴 Issues 1 high

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
Security 1 high

View in Codacy

🟢 Metrics 2 complexity · 0 duplication

Metric Results
Complexity 2
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@sonarqubecloud
Copy link
Copy Markdown

@JE-Chen JE-Chen merged commit 45d345b into main Apr 18, 2026
7 of 8 checks 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.

1 participant