Skip to content

Reject missing approved antivirus scope as a policy failure - #77

Merged
EndeavorEverlasting merged 1 commit into
mainfrom
fix/detector-missing-scope-policy
Nov 19, 2026
Merged

EndeavorEverlasting merged 1 commit into
mainfrom
fix/detector-missing-scope-policy

Conversation

@EndeavorEverlasting

@EndeavorEverlasting EndeavorEverlasting commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

User description

Scope

Follow-up to the review finding on #76. A moved or removed approved directory and a file replacing the approved path both reject the existing scan policy. The check and run commands return exit 12 before scanning. Scope access errors such as permission denial retain the local-state-unavailable status. Prior review records remain available for the same profile.

Proof

Both invalid-scope regressions failed on the merged baseline and passed on this candidate. The permission-error control also passed. 132 focused FileSteward tests passed and 5 skipped. The exact SysAdminSuite #572 adapter passed 20 tests and its registry validator. A real Linux callback recorded DETECTOR_POLICY_REJECTED for both invalid paths while preserving the original local finding and all fixture bytes.

Tested tree f52bd61f7dae472ad10d13a357be38b436194c1f.


CodeAnt-AI Description

Reject antivirus policies when the approved directory is missing or replaced

What Changed

  • Check and run reject the policy with status 12 when its approved directory is missing or has been replaced by a file, without scanning.
  • Previous review findings remain available for that profile.
  • Permission-related access failures continue to report unavailable state rather than a policy failure.

Impact

✅ Invalid scan scopes rejected before scanning
✅ Prior review findings remain available
✅ Permission failures retain unavailable-state status

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #a0432 Reviewed your PR eaeb5f3 Nov 19, 2026 · 18:49 18:52

@codeant-ai

codeant-ai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T18:50:46.585374Z eaeb5f3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Nov 19, 2026
@EndeavorEverlasting
EndeavorEverlasting merged commit 833a313 into main Nov 19, 2026
1 check was pending
@codeant-ai

codeant-ai Bot commented Nov 19, 2026

Copy link
Copy Markdown

CodeAnt  CodeAnt Nitpicks

1 code suggestion

1. scope_identity closes its directory handle before scan_directory reopens the path. If it disappears in between, scanning returns incomplete and run exits 10 instead of rejecting policy with 12.

Race condition · src/filesteward/antivirus/profile.py:127-132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant