Skip to content
← All reviews
go-gitea/gitea #38518 · bircni · 4mo ago

fix(actions): correctness and hardening fixes

Needs attention1 finding · openOpen the pull request on GitHub ↗
Panel verdict

The panel surfaced issues that deserve attention before merge.

1
raised by reviewers
1
kept by the panel

Findings

HighArchitectureconfidence 0.80

Potential nil pointer dereference when calling fillViewRunResponseSummary from a GET handler

fillViewRunResponseSummary now calls web.GetForm(ctx).(*ViewRequest) to retrieve the client's JobSummariesVersion. This function is likely shared between the initial GET view and the POST polling handler. On the GET path no form body is parsed, so GetForm(ctx) may return nil, causing a nil pointer dereference when the type assertion (*ViewRequest) is performed. The resulting panic would make the run view inaccessible and return a 500 error to the user.

If the function is only called from the POST handler this is not a bug, but the diff does not alter the call sites and the original function was used in both View and ViewPost. The initial GET view would then panic on every request.

Suggested fix ·

if req, _ := web.GetForm(ctx).(*ViewRequest); req != nil && req.JobSummariesVersion != summariesVersion {

3 reviewers · deepseek/deepseek-v4-flash · reviewed in 54s · 17 files, +413 −21

Ship the PR.
Skip the noise.

Free on 2 repositories · No credit card · Advisory only—never blocks a merge