Skip to content

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

Done

Description

@github-actions

Summary

The 2026-10-20 make golint-custom pre-check in §39360123187 reported 1,684 direct slice and string indexing findings across 343 Go files.

Largest affected paths

  • pkg/parser/schedule_parser.go (40)
  • pkg/workflow/js.go (39)
  • pkg/workflow/trigger_parser.go (32)
  • pkg/cli/update_actions_content_refs.go (32)
  • pkg/workflow/expression_parser.go (26)
  • pkg/cli/spec.go (24)
  • pkg/parser/github_urls.go (23)
  • pkg/cli/codemod_steps_run_secrets_env.go (20)
  • pkg/linters/sprintferrdot/sprintferrdot.go (20)
  • pkg/parser/inline_section_helpers.go (19)
  • pkg/parser/schema_errors.go (19)
  • pkg/cli/codemod_checkout_persist_credentials_false.go (19)
  • 331 other affected paths are represented in this run.

Representative diagnostics:

  • pkg/parser/schedule_parser.go:90:5: direct slice indexing; confirm index 0 is within len(p.tokens).
  • pkg/stringutil/ansi.go:30:6: direct string indexing; confirm index i is within len(s).

Remediation checklist

  • Address only direct slice and string indexing findings in this category; keep edits minimal and preserve existing behavior.
  • Check index and length invariants at each use. Add a clear bounds check or restructure access when input can be shorter than expected; avoid unrelated changes.
  • Run make fmt after Go edits and make golint-custom; confirm this category has no remaining findings in the new output.

References

Generated by 🧌 LintMonster · codex · gpt60 · 3.23 AIC · ⌖ 0.326 AIC · ⊞ 16.4K · ◷

Generated by 🧌 LintMonster · codex · gpt60 · 2.37 AIC · ⌖ 0.331 AIC · ⊞ 16.5K · ◷

Activity

  1. added
    cookie
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    automationcookielint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions