Skip to content

chore: merge develop → main - #83

Merged
mendsec merged 10 commits into
mainfrom
develop
Jul 25, 2026
Merged

mendsec merged 10 commits into
mainfrom
develop

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR by github-actions[bot].

@github-actions
github-actions Bot requested a review from mendsec as a code owner July 25, 2026 03:17
@codacy-production

codacy-production Bot commented Jul 25, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -9 complexity · 0 duplication

Metric Results
Complexity -9
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

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

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

The merge of development changes into main introduces automatic local subnet detection via the 'auto' keyword, but several issues must be addressed before merging. Codacy analysis indicates the PR is not up to standards, primarily due to security risks and logic issues.

Key concerns include a high-severity potential for command injection in integration tests and a bug in target parsing that allows duplicate scans and inflated detection counts if the 'auto' keyword is repeated. Additionally, the CLI implementation uses hardcoded stderr instead of Cobra's configured error stream, which limits testability and consistency. Acceptance criteria for feedback suppression via the --quiet flag are implemented but lack verification in the test suite.

About this PR

  • The PR description is generic and does not reflect the functional changes. Furthermore, the handling of the 'auto' keyword logic is not idempotent; repeated keywords in the input will lead to redundant network scanning and inaccurate host counts.

Test suggestions

  • Verify that targets.ParseRange('auto') resolves to a list of IP addresses.\n- [x] Verify that calling the 'scan' command without arguments defaults to 'auto' mode.\n- [x] Verify that using the 'auto' target prints an 'Auto-detected' summary to stderr.\n- [ ] Verify that the 'Auto-detected' summary is hidden when the '--quiet' flag is provided.\n- [ ] Verify that providing multiple targets (e.g. 'auto,192.168.1.1') correctly combines them without unnecessary duplication in the count.\n- [ ] Ensure integration tests sanitize binary paths to prevent injection vulnerabilities.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread tests/integration_test.go Outdated
Comment thread internal/cli/scan.go Outdated
Comment thread internal/cli/scan.go
Comment thread internal/cli/scan_test.go
Comment thread CHANGELOG.md

@mendsec mendsec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Full review completed successfully.

Review Summary:

  • CI / Status Checks: All 9 status checks passed (Build, Test, Vet, Govulncheck, golangci-lint, PR Rules Enforcer, Codacy Static Analysis).
  • Local Verification: go build ./..., go vet ./..., and go test -race -count=1 ./... passed with zero errors or race conditions.
  • Architecture & Compliance:
    • No scanning logic in CLI (delegates to catnet-io/engine).
    • Output formats and exit codes strictly follow existing contracts.
    • Security annotations (nosec / nosemgrep) and concurrency fixes verified.

PR approved for merge from develop into main.

@mendsec
mendsec merged commit bcb7342 into main Jul 25, 2026
10 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