Skip to content

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

Done

Description

@github-actions

Daily custom lint findings

The 2026-10-16 scan reported 1,710 direct slice and string indexing findings across 353 files. Scan run: §38841529624.

Representative diagnostics

  • pkg/logger/logger.go:55:60: direct slice indexing without bounds checking; prove the index is nonnegative and below len(basePaletteColors) before access.
  • pkg/stringutil/ansi.go:30:6: direct string indexing without bounds checking; prove the index is nonnegative and below len(s) before access.

Affected paths

Highest-count examples from the scan:

  • 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)

Remediation checklist

  • Address only direct slice and string indexing findings in this category.
  • Establish that each index is nonnegative and below the actual collection length before access. For parser and AST shapes, validate expected shape and handle malformed input safely.
  • Keep edits minimal, preserve behavior, and do not suppress findings or change linter rules.
  • Run make golint-custom to validate the fixes.

Generated by 🧌 LintMonster · codex · gpt60 · 2.94 AIC · ⌖ 0.316 AIC · ⊞ 16K · ◷

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

Activity

  1. added
    cookie
    on Oct 14, 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