Skip to content

LCORE-5401: Docstrings updates and minor fixes in vulnerability report script - #3162

Merged
tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-5401-doc-update-minor-fixes
Nov 6, 2026
Merged

tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-5401-doc-update-minor-fixes

Conversation

@tisnik

@tisnik tisnik commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

LCORE-5401: Docstrings updates and minor fixes in vulnerability report script

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library [pyproject.toml + uv.lock]
  • Bump-up dependent library [requirements.*.txt for Konflux]
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #LCORE-5401

Summary by CodeRabbit

Documentation

  • Clarified descriptions of vulnerability alert loading, counting, filtering, and repository processing, as well as statistics, charts, and issue reports.
  • Updated chart documentation to specify the vertical-axis limits for state, fix-days, and package charts.
  • These documentation updates do not change the reported behavior or functionality.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f83abfe and 521e545.

Files selected for processing: 1

  • scripts/vulnerability_report.py

No actionable comments were generated in the recent review.

Walkthrough

The vulnerability report script has revised documentation for alert processing, graph generation, and issue retrieval. Small code edits update UTC references, omit an explicit file-read mode, and rename a local GitHub token variable.

Changes

Vulnerability report updates

Layer / File(s) Summary
Alert loading and statistics
scripts/vulnerability_report.py
Documentation for alert loading, filtering, counting, and date statistics now lists error conditions and clarifies alert terminology.
Graph generation documentation
scripts/vulnerability_report.py
Graph documentation states vertical-axis limits and documents a ValueError when no package counts are available.
Issue retrieval and report processing
scripts/vulnerability_report.py
Documentation clarifies issue generation and repository processing. The code uses UTC, omits the explicit "r" file mode, and renames the local token variable.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Suggested labels: python, documentation, risk/low

Suggested reviewers: asimurka

Merge Risk: Minimal · previous review f83ab

No merge-blocking risk was identified in the report changes. Bandit currently fails because Python 3.8 is unavailable on its runner.

Pre-merge checks: Passed 7

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title describes the docstring updates and minor fixes in the vulnerability report script.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Performance And Algorithmic Complexity Passed PASSED. The changes update docstrings, rename a token variable, use the equivalent UTC constant, and omit the default file-read mode. They introduce no listed performance regression.
Security And Secret Handling Passed PASSED. The changes do not introduce a listed security violation. The token remains an environment variable used in the existing authorization header and is not logged by the changed code.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 11 functions across 1 files.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
Simplify code

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 83f4f05 and f83abfe.

Files selected for processing: 1

  • scripts/vulnerability_report.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 26

  • GitHub Check: dispatch / Review
  • GitHub Check: E2E: server / ci / default
  • GitHub Check: E2E: library / ci / skills
  • GitHub Check: E2E: server / ci / shields
  • GitHub Check: E2E: server / ci / mcp
  • GitHub Check: E2E: server / ci / authorized
  • GitHub Check: E2E: library / ci / shields
  • GitHub Check: E2E: library / ci / default
  • GitHub Check: E2E: server / ci / tls
  • GitHub Check: E2E: server / ci / skills
  • GitHub Check: E2E: library / ci / mcp
  • GitHub Check: E2E: library / ci / other
  • GitHub Check: E2E: server / ci / other
  • GitHub Check: E2E: library / ci / authorized
  • GitHub Check: E2E: server / ci / rbac
  • GitHub Check: E2E: library / ci / rbac
  • GitHub Check: Red Hat Konflux / rag-content-0-8-e2e-tests / lightspeed-stack-0-8
  • GitHub Check: Red Hat Konflux / lightspeed-core-0-8-enterprise-contract / lightspeed-stack-0-8
  • GitHub Check: Red Hat Konflux / lightspeed-stack-0-8-e2e-tests / lightspeed-stack-0-8
  • GitHub Check: integration_tests (3.14)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: Pylinter
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-8-on-pull-request
CI failures not shown inline: 4

GitHub Actions: Check image building / 0_build-pr.txt: LCORE-5401: Docstrings updates and minor fixes in vulnerability report script

Conclusion: failure

View job details

##[group]Run sudo apt update
 �[36;1msudo apt update�[0m
 �[36;1m# qemu is required for arm64 builds�[0m
 �[36;1msudo apt install -y buildah qemu-user-static�[0m
 shell: /usr/bin/bash -e {0}
 env:
   IMAGE_NAME: lightspeed-stack
   IMAGE_NAMESPACE: lightspeed-core
   LATEST_TAG: dev-latest
   CONTAINER_FILE: deploy/lightspeed-stack/Containerfile
 ##[endgroup]
 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
 Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
 Get:6 https://packages.microsoft.com/ubuntu/26.04/prod resolute InRelease [3964 B]
 Get:7 https://packages.microsoft.com/ubuntu/26.04/prod resolute/main arm64 Packages [135 kB]
 Get:8 https://packages.microsoft.com/ubuntu/26.04/prod resolute/main amd64 Packages [149 kB]
 Hit:2 http://azure.archive.ubuntu.com/ubuntu resolute InRelease
 Get:3 http://azure.archive.ubuntu.com/ubuntu resolute-updates InRelease [137 kB]
 Get:4 http://azure.archive.ubuntu.com/ubuntu resolute-backports InRelease [137 kB]
 Get:5 http://azure.archive.ubuntu.com/ubuntu resolute-security InRelease [137 kB]
 Get:9 http://azure.archive.ubuntu.com/ubuntu resolute-updates/main amd64v3 Packages [845 kB]
 Get:10 http://azure.archive.ubuntu.com/ubuntu resolute-updates/main Translation-en [192 kB]
 Get:11 http://azure.archive.ubuntu.com/ubuntu resolute-updates/universe amd64v3 Packages [377 kB]
 Get:12 http://azure.archive.ubuntu.com/ubuntu resolute-updates/universe Translation-en [118 kB]
 Get:13 http://azure.archive.ubuntu.com/ubuntu resolute-updates/restricted amd64v3 Packages [573 kB]
 Get:14 http://azure.archive.ubuntu.com/ubuntu resolute-updates/restricted Translation-en [119 kB]
 Get:15 http://azure.archive.ubuntu.com/ubuntu resolute-security/main amd64v3 Packages [657 kB]
 Get:16 http://azure.archive.ubuntu.com/ubuntu resolute-security/main Translation-en [148 kB]
 Get:17 http://azure.archive.ubuntu.com/ubuntu resolute-security/universe amd64v3 Packages [208 kB]
 Get:18 http://azure.archive.ubuntu.com...

GitHub Actions: Check image building / build-pr: LCORE-5401: Docstrings updates and minor fixes in vulnerability report script

Conclusion: failure

View job details

##[group]Run sudo apt update
 �[36;1msudo apt update�[0m
 �[36;1m# qemu is required for arm64 builds�[0m
 �[36;1msudo apt install -y buildah qemu-user-static�[0m
 shell: /usr/bin/bash -e {0}
 env:
   IMAGE_NAME: lightspeed-stack
   IMAGE_NAMESPACE: lightspeed-core
   LATEST_TAG: dev-latest
   CONTAINER_FILE: deploy/lightspeed-stack/Containerfile
 ##[endgroup]
 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
 Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
 Get:6 https://packages.microsoft.com/ubuntu/26.04/prod resolute InRelease [3964 B]
 Get:7 https://packages.microsoft.com/ubuntu/26.04/prod resolute/main arm64 Packages [135 kB]
 Get:8 https://packages.microsoft.com/ubuntu/26.04/prod resolute/main amd64 Packages [149 kB]
 Hit:2 http://azure.archive.ubuntu.com/ubuntu resolute InRelease
 Get:3 http://azure.archive.ubuntu.com/ubuntu resolute-updates InRelease [137 kB]
 Get:4 http://azure.archive.ubuntu.com/ubuntu resolute-backports InRelease [137 kB]
 Get:5 http://azure.archive.ubuntu.com/ubuntu resolute-security InRelease [137 kB]
 Get:9 http://azure.archive.ubuntu.com/ubuntu resolute-updates/main amd64v3 Packages [845 kB]
 Get:10 http://azure.archive.ubuntu.com/ubuntu resolute-updates/main Translation-en [192 kB]
 Get:11 http://azure.archive.ubuntu.com/ubuntu resolute-updates/universe amd64v3 Packages [377 kB]
 Get:12 http://azure.archive.ubuntu.com/ubuntu resolute-updates/universe Translation-en [118 kB]
 Get:13 http://azure.archive.ubuntu.com/ubuntu resolute-updates/restricted amd64v3 Packages [573 kB]
 Get:14 http://azure.archive.ubuntu.com/ubuntu resolute-updates/restricted Translation-en [119 kB]
 Get:15 http://azure.archive.ubuntu.com/ubuntu resolute-security/main amd64v3 Packages [657 kB]
 Get:16 http://azure.archive.ubuntu.com/ubuntu resolute-security/main Translation-en [148 kB]
 Get:17 http://azure.archive.ubuntu.com/ubuntu resolute-security/universe amd64v3 Packages [208 kB]
 Get:18 http://azure.archive.ubuntu.com...

GitHub Actions: Bandit security scanner / 0_bandit.txt: LCORE-5401: Docstrings updates and minor fixes in vulnerability report script

Conclusion: failure

View job details

##[group]Installed versions
 Version 3.8 was not found in the local cache
 (node:2083) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
 (Use `node --trace-deprecation ...` to show where the warning was created)
 ##[error]The version '3.8' with architecture 'x64' was not found for Ubuntu 26.04.

GitHub Actions: Bandit security scanner / bandit: LCORE-5401: Docstrings updates and minor fixes in vulnerability report script

Conclusion: failure

View job details

##[group]Installed versions
 Version 3.8 was not found in the local cache
 (node:2083) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
 (Use `node --trace-deprecation ...` to show where the warning was created)
 ##[error]The version '3.8' with architecture 'x64' was not found for Ubuntu 26.04.
Additional context used

Code guidelines: 1

AGENTS.md — auto-discovered
Path-based instructions: 1

Source excerpt: Use absolute imports for internal modules: `from authentication import get_auth_dependency` Source excerpt: FastAPI dependencies: `from fastapi import APIRouter, HTTPException, Request, status, Depends` Source excerpt: OGX i...

CodeRabbit inference engine (AGENTS.md)

Files:

  • scripts/vulnerability_report.py
ast-grep (0.51.1)

scripts/vulnerability_report.py

[warning] 836-836: File path is request-/variable-derived; validate and normalize to prevent path traversal.
Context: open(dependabot_file, encoding="utf-8")
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(open-filename-from-request)

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:20 AM UTC · Completed 8:33 AM UTC

Commit: f83abfe · View workflow run →

Runtime: pi · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.89

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Nov 6, 2026
@fullsend-ai-review

Copy link
Copy Markdown

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Small docstring-and-minor-fix change to a single standalone script by its primary author. The only elevated signal is the protected-path flag (scripts/) and a moderate fix-commit history. No security, CI, or dependency impact.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Review

Findings

Medium

  • [protected-path] scripts/vulnerability_report.py — This PR modifies a file under the protected path scripts/. The PR is linked to LCORE-5401 and the description explains the rationale (docstring updates and minor fixes). Human approval is always required for protected-path changes, regardless of context.

Earlier findings

  • scripts/vulnerability_report.py:342 — doc-style: resolved by change (docstring for opened_cves rewritten from one-line to multi-line format with proper Raises: section)

Risk assessment missing — risk assessment is enabled but no score was
produced. A human reviewer must evaluate this PR.

Previous run

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJsb3ciLCJjYXRlZ29yeSI6ImRvYy1zdHlsZSIsImZpbGUiOiJzY3JpcHRzL3Z1bG5lcmFiaWxpdHlfcmVwb3J0LnB5IiwiaWQiOiJmX2JmZmRjOGM3N2Y0Y2YzZTQiLCJsaW5lIjozNDIsImFjdGlvbmFibGUiOnRydWV9XX0= -->

Review

Findings

Medium

  • [protected-path] scripts/vulnerability_report.py — This PR modifies a file under the scripts/ protected path. The PR links to JIRA issue LCORE-5401 and describes the rationale (docstring updates and minor fixes), providing sufficient context. Human approval is always required for protected-path changes regardless of context.

Low

  • [doc-style] scripts/vulnerability_report.py:342 — Inconsistent docstring delimiter style: opened_cves uses a one-line opening ("""Count alerts...) with the closing """ on its own line but no blank line before it, while the sibling fixed_cves (and most other functions in this file) uses the """\n opening form with a trailing blank line before the closing """. Both styles now coexist in adjacent functions modified in this PR.
    Remediation: Adopt the multi-line """\n ... \n""" form with a trailing blank line before the closing triple-quote, matching the dominant pattern in the file.

Labels: PR modifies a scripts/ utility for vulnerability reporting with documentation-only changes.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added documentation Improvements or additions to documentation Review effort 1/5 labels Nov 6, 2026
@tisnik
tisnik force-pushed the lcore-5401-doc-update-minor-fixes branch from f83abfe to 521e545 Compare November 6, 2026 08:35
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:54 AM UTC · Completed 9:05 AM UTC

Commit: 521e545 · View workflow run →

Runtime: pi · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.23

@fullsend-ai-review fullsend-ai-review Bot removed the risk/moderate PR risk: moderate label Nov 6, 2026
@fullsend-ai-review
fullsend-ai-review Bot dismissed their stale review November 6, 2026 09:05

Superseded by updated review

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label Nov 6, 2026
@tisnik
tisnik merged commit 09326d1 into lightspeed-core:main Nov 6, 2026
72 of 75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation requires-manual-review Review requires human judgment Review effort 1/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant