Skip to content

Adds Microsoft APM to package-manager reporting and dependency discovery. - #250

Merged
andrew merged 1 commit into
git-pkgs:mainfrom
abhinavgautam01:apm-detection
Nov 15, 2026
Merged

andrew merged 1 commit into
git-pkgs:mainfrom
abhinavgautam01:apm-detection

Conversation

@abhinavgautam01

@abhinavgautam01 abhinavgautam01 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • knowledge/_shared/apm.toml: shared tool definition with category package_manager, install command apm install and apm.yml, apm.lock.yaml and apm.lock as detection and config paths. It has no ecosystems key, so detection does not depend on Python or any other language.
  • knowledge/_shared/_manifests.toml: adds the three files to dependency discovery. They are parsed by the APM parser in manifests v0.14.0 (Parse APM manifests and lockfiles manifests#136).
  • Bumps github.com/git-pkgs/roles to v0.1.4 for the APM rules from Classify APM manifests, lockfiles and installed modules roles#14, so content under apm_modules/ is excluded from project evidence.
  • Regenerates the README tools block.

Changed-file scans need no new code: the files are in the manifest list and the tool's detect files, so the existing manifest and file-match checks recheck APM.

Tests

detect/apm_test.go runs through the detection engine:

  • APM-only (apm.yml) and lockfile-only (apm.lock.yaml, legacy apm.lock) fixtures: APM is detected, the file is reported as an apm manifest and its dependency is extracted
  • APM alongside npm
  • installed packages under apm_modules/ are excluded from project files, manifests and dependencies (this fails on roles v0.1.3)
  • changed-file scans for each of the three paths recheck APM and FilterByChangedFiles keeps it

Summary by CodeRabbit

  • New Features
    • Added APM package-manager detection, including support for its manifest and lockfiles. APM can be detected alongside npm, and scans account for changed APM files.
  • Bug Fixes
    • Excluded installed modules from project files and dependency results.
  • Documentation
    • Added APM to the README’s package-manager list.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds APM metadata and supported manifest names, tests APM detection and filtering behavior, updates the README package-manager list, and upgrades the roles dependency.

Changes: APM package-manager support

Layer / File(s) Summary
Register APM metadata
knowledge/_shared/apm.toml, knowledge/_shared/_manifests.toml, go.mod
APM metadata defines detection files, install commands, configuration files, and the package-manager role. The shared manifest list adds three APM filenames, and the roles dependency changes from v0.1.3 to v0.1.4.
Cover APM detection and document support
detect/apm_test.go, README.md
Tests cover detection for the three manifest names, coexistence with npm, installed-module exclusion, and changed-file filtering. The README package-manager list adds APM.

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

Change: Feature

Suggested reviewers: andrew

Merge Risk: Minimal · up to d63d8

This adds APM detection and dependency discovery through shared definitions and a dependency bump. No concrete defect was found, and the change is easy to revert, so merge risk is minimal.

Security architecture risk: Minimal · up to d63d8

The change adds package-manager recognition without establishing a new execution privilege, persistence mechanism, or system boundary. No introduced or worsened material security risk was established in the inspected change.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Title check Passed The title states that the PR adds Microsoft APM to package-manager reporting and dependency discovery. The changeset matches this. It adds the APM tool definition, the apm.yml, apm.lock.yaml, and apm.…
Full details: Title check

Explanation

The title states that the PR adds Microsoft APM to package-manager reporting and dependency discovery. The changeset matches this. It adds the APM tool definition, the apm.yml, apm.lock.yaml, and apm.lock file lists, APM detection tests, a README entry for APM, and a roles dependency bump for APM rules.

Finishing Touches

Generate unit tests (beta)

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

Warning

Some tools did not complete. Review the errors below.

OSV Scanner (2.7.0)

go.mod

OSV Scanner exited with code 127 without a usable report

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 587fa6c4-8959-4f08-bd27-f7561b485f25
Commits

Reviewing files that changed from the base of the PR and between 67a8f00 and d63d8a9.

Files ignored due to path filters: 1

  • go.sum is excluded by !**/*.sum
Files selected for processing: 5

  • README.md
  • detect/apm_test.go
  • go.mod
  • knowledge/_shared/_manifests.toml
  • knowledge/_shared/apm.toml

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

@andrew andrew changed the title Adds [Microsoft APM](https://github.com/microsoft/apm) to package-manager reporting and dependency discovery. Adds Microsoft APM to package-manager reporting and dependency discovery. Nov 15, 2026
@andrew
andrew merged commit 71f912d into git-pkgs:main Nov 15, 2026
7 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.

2 participants