📝(docs) document ICAP malware detection support - #2558
Conversation
Add a documentation page describing how to configure the ICAP malware detection backend from django-lasuite with an external ICAP server (c-icap/ClamAV), including the environment variables, the Helm wiring through backend.envVars and the scanner requirements. Link it from the environment variables reference and the documentation table of contents.
Add a section to the Kubernetes installation guide showing how to provision a development ICAP antivirus server (c-icap with ClamAV) from the dev dependencies chart, with the backend environment variables to enable malware detection, and link it from the malware detection documentation.
WalkthroughAdded documentation for malware scanning through the ICAP backend. The changes describe scan verdicts, configuration variables, Helm settings, ICAP server requirements, Kubernetes installation, file-size limits, and monitoring. The documentation table of contents and environment variable reference now link to the malware detection page. Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@documentation/env.md`:
- Line 95: In the MALWARE_DETECTION_BACKEND environment variable description
row, fix the grammatical error in the description column. Change the phrase
"backend use from the django-lasuite package" to use proper grammar by inserting
"to" before "use" and adding a comma after "backend" to read "backend to use,
from the django-lasuite package" or similar grammatically correct phrasing that
maintains the original meaning.
In `@documentation/installation/kubernetes.md`:
- Around line 223-228: Add a language identifier to the fenced code block
containing the Helm installation and kubectl output, using text or the file’s
established convention, without changing its contents.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: b4468c9f-da63-4897-ae26-c0923d3ad251
📒 Files selected for processing (5)
documentation/README.mddocumentation/env.mddocumentation/examples/helm/cicap.values.yamldocumentation/installation/kubernetes.mddocumentation/malware_detection.md
| | LOGOUT_REDIRECT_URL | Logout redirect url | | | ||
| | MALWARE_DETECTION_BACKEND | The malware detection backend use from the django-lasuite package | lasuite.malware_detection.backends.dummy.DummyBackend | | ||
| | MALWARE_DETECTION_PARAMETERS | A dict containing all the parameters to initiate the malware detection backend | {"callback_path": "core.malware_detection.malware_detection_callback",} | | ||
| | MALWARE_DETECTION_BACKEND | The malware detection backend use from the django-lasuite package. See [malware detection documentation](malware_detection.md) to configure the ICAP backend | lasuite.malware_detection.backends.dummy.DummyBackend | |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the grammar in the description.
"The malware detection backend use from the django-lasuite package" is grammatically incorrect. Use "The malware detection backend to use, from the django-lasuite package" or similar.
📝 Proposed fix
-| MALWARE_DETECTION_BACKEND | The malware detection backend use from the django-lasuite package. See [malware detection documentation](malware_detection.md) to configure the ICAP backend | lasuite.malware_detection.backends.dummy.DummyBackend |
+| MALWARE_DETECTION_BACKEND | The malware detection backend to use, from the django-lasuite package. See [malware detection documentation](malware_detection.md) to configure the ICAP backend | lasuite.malware_detection.backends.dummy.DummyBackend |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | MALWARE_DETECTION_BACKEND | The malware detection backend use from the django-lasuite package. See [malware detection documentation](malware_detection.md) to configure the ICAP backend | lasuite.malware_detection.backends.dummy.DummyBackend | | |
| | MALWARE_DETECTION_BACKEND | The malware detection backend to use, from the django-lasuite package. See [malware detection documentation](malware_detection.md) to configure the ICAP backend | lasuite.malware_detection.backends.dummy.DummyBackend | |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@documentation/env.md` at line 95, In the MALWARE_DETECTION_BACKEND
environment variable description row, fix the grammatical error in the
description column. Change the phrase "backend use from the django-lasuite
package" to use proper grammar by inserting "to" before "use" and adding a comma
after "backend" to read "backend to use, from the django-lasuite package" or
similar grammatically correct phrasing that maintains the original meaning.
| ``` | ||
| $ helm install --repo https://suitenumerique.github.io/helm-dev-backend -f documentation/examples/helm/cicap.values.yaml cicap dev-backend | ||
| $ kubectl get pods | ||
| NAME READY STATUS RESTARTS AGE | ||
| cicap-dev-backend-cicap-xxxxx-xxxxx 1/1 Running 0 10s | ||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Add a language to the fenced code block.
markdownlint (MD040) flags this block. Add a language identifier, for example shell or text, consistent with other code blocks in this file.
📝 Proposed fix
-```
+```text
$ helm install --repo https://suitenumerique.github.io/helm-dev-backend -f documentation/examples/helm/cicap.values.yaml cicap dev-backend
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
cicap-dev-backend-cicap-xxxxx-xxxxx 1/1 Running 0 10s</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)
[warning] 223-223: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@documentation/installation/kubernetes.md` around lines 223 - 228, Add a
language identifier to the fenced code block containing the Helm installation
and kubectl output, using text or the file’s established convention, without
changing its contents.
Source: Linters/SAST tools
Documentation for the ICAP malware detection backend (shipped in
django-lasuite 0.0.28):
documentation/malware_detection.md: what ICAP is, productionconfiguration via MALWARE_DETECTION_BACKEND / _PARAMETERS, links to the
django-lasuite docs, note that production expects an operator-provided
ICAP server
env.md: new env vars documentedkubernetes.md: "Find ICAP server connection values" section pointing tothe dev chart (
cicapcomponent) + example valuesdocumentation/examples/helm/cicap.values.yamlBlocked internally (not in this PR): the
django-lasuite[all]bump0.0.26 → 0.0.28 depends on the 0.0.28 release on PyPI.
See also related PR suitenumerique/django-lasuite#80