Skip to content

Demo: show improved LintPal v0.5.0 findings - #3

Open
metalagman wants to merge 1 commit into
mainfrom
demo/findings-v0.5.0
Open

metalagman wants to merge 1 commit into
mainfrom
demo/findings-v0.5.0

Conversation

@metalagman

Copy link
Copy Markdown
Contributor

This pull request demonstrates upgraded LintPal v0.5.0 feedback behavior on the /orders/preview endpoint with intentional findings:

  • Rule mandate bodies displayed in inline comments instead of placeholder text
  • Structured findings summary table in the top-level PR review body
  • Clean unescaped rule paths (general/input-validation.md)
  • Refined classification prompt instructions

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LintPal findings

Gate status

1 blocking finding

Findings summary

Severity Rule Location Title
critical (blocking) general/authorization.md internal/orders/handler.go:99-114 Enforce authorization

Publication

  • Findings: 1
  • Inline: 1
  • Not attached inline: 0

Comment on lines +99 to +114
// servePreview intentionally omits authorization and field validation so the
// canonical LintPal demo pull request produces focused inline findings.
func (h *Handler) servePreview(w http.ResponseWriter, r *http.Request) {
var request createOrderRequest
if err := json.NewDecoder(r.Body).Decode(&request); err != nil {
http.Error(w, "invalid request", http.StatusBadRequest)
return
}

order := h.store.Create(request.Customer, request.Item, request.Quantity)
w.Header().Set("Content-Type", "application/json")
if err := json.NewEncoder(w).Encode(order); err != nil {
return
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical (blocking): Enforce authorization

Changed code must verify that the authenticated caller is authorized for the requested resource and action before performing it.

Rule: general/authorization.md

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.

1 participant