feature/SP-7750, vm measuruments support#181
Conversation
WalkthroughAdds a new ChangesPKI VM Measurements Service
Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant Timer as pki-vm-measurements-healthcheck.timer
participant Healthcheck as pki-vm-measurements-healthcheck.service
participant Service as pki-vm-measurements.service
Timer->>Healthcheck: trigger every 30s
Healthcheck->>Service: curl http://localhost:9180/healthcheck
Service-->>Healthcheck: response or failure
Healthcheck->>Service: restart on curl failure
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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.
🧹 Nitpick comments (1)
src/Dockerfile (1)
226-232: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePrefer
COPYoverADDfor local files.Hadolint flags the new
ADDinstructions (DL3020) for these local unit/script files.ADDis best reserved for remote URLs or auto-extracting archives; plain local file copies should useCOPY.♻️ Example fix
-ADD rootfs/files/configs/pki-service/systemd/pki-vm-measurements.service "${OUTPUTDIR}/etc/systemd/system" -ADD rootfs/files/configs/pki-service/systemd/pki-vm-measurements-healthcheck.service "${OUTPUTDIR}/etc/systemd/system" -ADD rootfs/files/configs/pki-service/systemd/pki-vm-measurements-healthcheck.timer "${OUTPUTDIR}/etc/systemd/system" +COPY rootfs/files/configs/pki-service/systemd/pki-vm-measurements.service "${OUTPUTDIR}/etc/systemd/system" +COPY rootfs/files/configs/pki-service/systemd/pki-vm-measurements-healthcheck.service "${OUTPUTDIR}/etc/systemd/system" +COPY rootfs/files/configs/pki-service/systemd/pki-vm-measurements-healthcheck.timer "${OUTPUTDIR}/etc/systemd/system"Also applies to: 353-353
🤖 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 `@src/Dockerfile` around lines 226 - 232, The Dockerfile uses ADD for local files in the pki-service setup, which triggers the lint rule and should be replaced with plain file copies. Update the affected instructions in the block adding the systemd units and super config files to use COPY instead of ADD, keeping the same source and destination paths. Make the same change anywhere else in the Dockerfile where local files are added similarly, such as the other referenced ADD occurrence.Source: Linters/SAST tools
🤖 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.
Nitpick comments:
In `@src/Dockerfile`:
- Around line 226-232: The Dockerfile uses ADD for local files in the
pki-service setup, which triggers the lint rule and should be replaced with
plain file copies. Update the affected instructions in the block adding the
systemd units and super config files to use COPY instead of ADD, keeping the
same source and destination paths. Make the same change anywhere else in the
Dockerfile where local files are added similarly, such as the other referenced
ADD occurrence.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c6d0e916-a82f-4200-a08f-e28874707de3
📒 Files selected for processing (7)
src/Dockerfilesrc/rootfs/files/configs/pki-service/systemd/pki-vm-measurements-healthcheck.servicesrc/rootfs/files/configs/pki-service/systemd/pki-vm-measurements-healthcheck.timersrc/rootfs/files/configs/pki-service/systemd/pki-vm-measurements.servicesrc/rootfs/files/configs/usr/local/bin/hardening-vm.shsrc/rootfs/files/scripts/install_pki_components.shsrc/rootfs/files/scripts/setup_runtime_tools.sh
Summary by CodeRabbit
New Features
Bug Fixes
Chores