Skip to content

Improve line and column reporting for rule findings #2

@Guteentak

Description

@Guteentak

Summary

Improve source location reporting for ConfigSentinel rule findings.

Currently, parse errors can include line and column information, but many rule findings only report the file path. Adding line and column information where practical would make findings easier to fix.

Scope

Improve line and column reporting for at least one config family.

Good starting candidates:

  • GitHub Actions permissions: write-all
  • GitHub Actions pull_request_target
  • MCP filesystem path findings
  • Claude Code broad permission findings

Suggested implementation

  • Add helper utilities for finding line numbers in raw text
  • Populate line and possibly column in Issue
  • Keep output deterministic
  • Add tests for line reporting

Acceptance criteria

  • At least one existing rule now reports line information
  • Text output includes the location if available
  • JSON output includes the location fields
  • Existing behavior remains backward-compatible
  • Tests are added
  • All tests pass

Notes

This does not need to solve every rule at once. A small, well-tested improvement is preferred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions