Skip to content

ci(lab9): govulncheck gate - #3

Open
HNS2112 wants to merge 5 commits into
mainfrom
feature/lab9
Open

ci(lab9): govulncheck gate#3
HNS2112 wants to merge 5 commits into
mainfrom
feature/lab9

Conversation

@HNS2112

@HNS2112 HNS2112 commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Internal PR to exercise the CI gate with govulncheck.

HNS2112 added 3 commits August 6, 2026 19:35
Signed-off-by: HNS <239804565+HNS2112@users.noreply.github.com>
Signed-off-by: HNS <239804565+HNS2112@users.noreply.github.com>
Signed-off-by: Elvira <239804565+HNS2112@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec668977c7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/Dockerfile

FROM golang:1.24.6-bookworm AS builder
WORKDIR /src
COPY go.mod go.su[m] ./

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Stop requiring an absent go.sum in the Docker build

In a fresh checkout this Dockerfile cannot build because app/go.sum is not tracked, while Docker treats go.su[m] as a glob that only matches go.sum, not as an optional source. The failure happens before go mod download, so any docker compose build/Lab 6 image rebuild from the committed tree stops at this COPY; either add a real go.sum or avoid copying it until it exists.

Useful? React with 👍 / 👎.

Comment thread app/Dockerfile
@@ -0,0 +1,24 @@
# syntax=docker/dockerfile:1

FROM golang:1.24.6-bookworm AS builder

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Build the image with the patched Go toolchain

This pins the shipped binary to Go 1.24.6, but the committed Trivy image report shows the resulting app/quicknotes binary has 15 HIGH/CRITICAL stdlib findings at v1.24.6, including fixes available in 1.24.12/1.24.13. Because the new CI job uses go-version-input: '1.24' rather than this Dockerfile pin, CI can pass with a newer patch while the container artifact remains vulnerable; bump the builder image to a patched 1.24.x tag or otherwise align the image build with the gate.

Useful? React with 👍 / 👎.

Comment thread .gitignore
Comment on lines +66 to +67
zap-report.*
zap-report-after.*

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Anchor ZAP report ignores to avoid hiding lab evidence

Because this ignore pattern has no slash, Git applies it to matching files in any directory, even though the note just above says Lab 9 ZAP reports are deliverables students must be able to commit. A student who generates a new untracked zap-report.html/.json under their submission or evidence directory will have it silently ignored unless they force-add it; if these are only meant to be root scratch files, anchor the patterns with /.

Useful? React with 👍 / 👎.

Comment thread submissions/lab9.md
Comment on lines +243 to +247
Regression test, covering two routes rather than one so that a future route added
outside `wrap` is caught:

```go
func TestSecurityHeaders_PresentOnAllRoutes(t *testing.T) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add the documented security-header regression test

The submission claims this regression test was added, but the actual Go test file only loses a blank line and rg TestSecurityHeaders app finds no implementation. In the Lab 9 flow this test is the guard that the middleware stays applied to all routes, so the code can now regress without CI noticing; add the test to app/handlers_test.go or remove the claimed evidence.

Useful? React with 👍 / 👎.

Signed-off-by: Elvira <239804565+HNS2112@users.noreply.github.com>
Signed-off-by: Elvira <239804565+HNS2112@users.noreply.github.com>
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