Skip to content

[lint-monster] Guard direct slice and string indexing #71532

Open

Description

@github-actions

Daily lint findings — 2026-10-25

Pre-check run: §40155375440

The scan reported 1,473 direct slice or string indexing findings across 300 files.

Affected paths with the most findings: pkg/parser/schedule_parser.go (40), pkg/workflow/js.go (39), pkg/cli/update_actions_content_refs.go (35), pkg/workflow/trigger_parser.go (32), pkg/workflow/expression_parser.go (30), pkg/cli/spec.go (24), pkg/parser/github_urls.go (23), pkg/linters/sprintferrdot/sprintferrdot.go (20), pkg/parser/inline_section_helpers.go (19), and pkg/parser/schema_errors.go (19), plus 290 other files.

Representative diagnostics: pkg/logger/logger.go:55 indexes basePaletteColors using idx without a recognized bounds check; pkg/logger/logger.go:110 indexes colorPalette using a modulo expression.

Remediation checklist

  • Run make golint-custom and address only direct slice/string indexing findings in this category.
  • Establish valid bounds before each access, or use a safe alternative that preserves behavior for empty and boundary inputs.
  • Keep edits minimal, avoid suppressing diagnostics or changing unrelated code, and add focused tests when a fix changes boundary behavior.
  • Run make golint-custom again and confirm this category is clean; report any finding that cannot be safely fixed with a short reason.

Generated by 🧌 LintMonster · codex · gpt60 · ~3 AIC · ⌖ ~1 AIC · ⊞ 16.6K · ◷

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions