Build 277 success
gitbay-security on main · c189065d76 · queued 2026-11-05 04:00 UTC · finished 2026-11-05 04:34 UTC · ran 1m23s
setup
$ git clone ssh://git@127.0.0.1/krz/skunky-art.git (c189065d76)
step 1/2 mkdir -p "$GITBAY_RESULTS"
step 2/2 opengrep scan --quiet --disable-version-check --config /opt/opengrep-rules --sarif-output="$GITBAY_RESULTS/opengrep.sarif" .
┌──────────────────┐
│ 31 Code Findings │
└──────────────────┘
Dockerfile
❱ opt.opengrep-rules.dockerfile.audit.dockerfile-source-not-pinned
To ensure reproducible builds, pin Dockerfile `FROM` commands to a specific hash. You can find the
hash by running `docker pull golang` and then specify it with `golang:${GO_VERSION}@sha256:<hash
goes here>`
3┆ FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS build
❱ opt.opengrep-rules.dockerfile.best-practice.avoid-platform-with-from
Using '--platform' with FROM restricts the image to build on a single platform. Further, this must
be the same as the build platform. If you intended to specify the target platform, use the utility
'docker buildx --platform=' instead.
3┆ FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS build
app/api.go
❯❱ opt.opengrep-rules.go.lang.security.audit.crypto.math-random-used
Do not use `math/rand`. Use `crypto/rand` instead.
▶▶┆ Autofix ▶ crypto/rand
5┆ "math/rand"
app/cache.go
❯❱ opt.opengrep-rules.go.lang.security.audit.crypto.use-of-sha1
Detected SHA1 hash algorithm which is considered insecure. SHA1 is not collision resistant and is
therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
212┆ key := sha1.Sum([]byte(subdomain + path)) //nolint:gosec // G401: cache-key hash, not a
security primitive
❯❱ opt.opengrep-rules.go.lang.correctness.permissions.incorrect-default-permission
Detected file permissions that are set to more than `0600` (user/owner can read and write). Setting
file permissions to higher than `0600` is most likely unnecessary and violates the principle of
least privilege. Instead, set permissions to be `0600` or less for os.Chmod, os.Mkdir, os.OpenFile,
os.MkdirAll, and ioutil.WriteFile
▶▶┆ Autofix ▶ 0600
299┆ return os.Mkdir(dir, 0700)
app/cli.go
❯❱ opt.opengrep-rules.go.lang.correctness.permissions.incorrect-default-permission
Detected file permissions that are set to more than `0600` (user/owner can read and write). Setting
file permissions to higher than `0600` is most likely unnecessary and violates the principle of
least privilege. Instead, set permissions to be `0600` or less for os.Chmod, os.Mkdir, os.OpenFile,
os.MkdirAll, and ioutil.WriteFile
▶▶┆ Autofix ▶ 0600
157┆ instancesJSON, err := os.OpenFile("instances.json", os.O_CREATE|os.O_WRONLY, 0644)
//nolint:gosec // G302
⋮┆----------------------------------------
▶▶┆ Autofix ▶ 0600
163┆ instancesFile, err := os.OpenFile("INSTANCES.md", os.O_APPEND|os.O_CREATE|os.O_WRONLY,
0644) //nolint:gosec // G302
app/config.go
❯❱ opt.opengrep-rules.go.lang.correctness.permissions.incorrect-default-permission
Detected file permissions that are set to more than `0600` (user/owner can read and write). Setting
file permissions to higher than `0600` is most likely unnecessary and violates the principle of
least privilege. Instead, set permissions to be `0600` or less for os.Chmod, os.Mkdir, os.OpenFile,
os.MkdirAll, and ioutil.WriteFile
▶▶┆ Autofix ▶ 0600
150┆ if err := os.MkdirAll(path, 0700); err != nil {
app/router.go
❯❱ opt.opengrep-rules.go.lang.security.audit.xss.no-direct-write-to-responsewriter
Detected directly writing or similar in 'http.ResponseWriter.write()'. This bypasses HTML escaping
that prevents cross-site scripting vulnerabilities. Instead, use the 'html/template' package and
render data using 'template.Execute()'.
212┆ _, _ = w.Write(openStatic("css/skunky.css"))
⋮┆----------------------------------------
218┆ _, _ = w.Write([]byte(css))
⋮┆----------------------------------------
221┆ _, _ = w.Write(openStatic("images/logo.png"))
app/wrapper.go
❯❱ opt.opengrep-rules.go.lang.security.audit.xss.unsafe-template-type
Semgrep could not determine that the argument to 'template.HTML()' is a constant. 'template.HTML()'
and similar does not escape contents. Be absolutely sure there is no user-controlled data in this
template. If user data can reach this template, you may have a XSS vulnerability. Instead, do not
use this function and use 'template.Execute()'.
52┆ return template.HTML(s.ParseComments(fetchComments(id, cursor, s.Page, kind)))
//nolint:gosec // G203: ParseComments escapes its input
⋮┆----------------------------------------
71┆ return template.HTML(link.String()) //nolint:gosec // G203: escaped above
⋮┆----------------------------------------
111┆ group.Admins += template.HTML(htm.String()) //nolint:gosec // G203: BuildUserPlate escapes
its input
⋮┆----------------------------------------
135┆ group.About.DescriptionFormatted = template.HTML(ParseDescription(s.Host,
groupAbout.Description)) //nolint:gosec // G203: ParseDescription escapes its input
⋮┆----------------------------------------
139┆ group.About.DescriptionFormatted = template.HTML(ParseDescription(s.Host,
about.Description)) //nolint:gosec // G203: ParseDescription escapes its input
⋮┆----------------------------------------
155┆ out += template.HTML(social.String()) //nolint:gosec // G203: escaped above
⋮┆----------------------------------------
168┆ out += template.HTML(interest.String()) //nolint:gosec // G203: escaped above
⋮┆----------------------------------------
195┆ group.Gallery.List = template.HTML(s.DeviationList(content.Content.Results, true,
DeviationList{ //nolint:gosec // G203: DeviationList escapes its input
196┆ More: content.Content.HasMore,
197┆ }))
⋮┆----------------------------------------
205┆ group.Gallery.List = template.HTML(s.DeviationList(x.ModuleData.Folder.Deviations, true,
DeviationList{ //nolint:gosec // G203: DeviationList escapes its input
206┆ Pages: x.ModuleData.Folder.Pages,
207┆ More: x.ModuleData.Folder.HasMore,
208┆ }))
⋮┆----------------------------------------
260┆ return template.HTML(folders.String()) //nolint:gosec // G203: escaped above
⋮┆----------------------------------------
293┆ return template.HTML(plates.String()) //nolint:gosec // G203: BuildUserPlate escapes its
input
⋮┆----------------------------------------
329┆ post.Description = template.HTML(ParseDescription(s.Host, post.Post.Deviation.TextContent))
//nolint:gosec // G203: ParseDescription escapes its input
⋮┆----------------------------------------
331┆ post.Description = template.HTML(ParseDescription(s.Host,
post.Post.Deviation.Extended.DescriptionText)) //nolint:gosec // G203: ParseDescription
escapes its input
⋮┆----------------------------------------
336┆ post.Related += template.HTML(s.DeviationList(x.Deviations, false)) //nolint:gosec // G203:
DeviationList escapes its input
⋮┆----------------------------------------
349┆ post.Tags += template.HTML(tag.String()) //nolint:gosec // G203: escaped above
⋮┆----------------------------------------
378┆ s.Templates.DDStrips = template.HTML(strips.String())
//nolint:gosec // G203: escaped above
⋮┆----------------------------------------
379┆ s.Templates.SomeList = template.HTML(s.DeviationList(dd.Deviations, true, DeviationList{
//nolint:gosec // G203: DeviationList escapes its input
380┆ Pages: 0,
381┆ More: dd.HasMore,
382┆ }))
⋮┆----------------------------------------
421┆ ss.List = template.HTML(s.DeviationList(ss.Content.Results, false, DeviationList{
//nolint:gosec // G203: DeviationList escapes its input
422┆ Pages: ss.Content.Pages,
423┆ More: ss.Content.HasMore,
424┆ }))
❯❱ opt.opengrep-rules.go.lang.security.audit.crypto.use-of-sha1
Detected SHA1 hash algorithm which is considered insecure. SHA1 is not collision resistant and is
therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
443┆ key := sha1.Sum([]byte("emojitar:" + string(s.Type) + ":" + strings.ToLower(name)))
//nolint:gosec // G401: cache key, not a security primitive
scripts/check-instances.py
❯❱ opt.opengrep-rules.python.lang.security.audit.dynamic-urllib-use-detected
Detected a dynamic value being used with urllib. urllib supports 'file://' schemes, so a dynamic
value controlled by a malicious actor may allow them to read arbitrary files. Audit uses of urllib
calls to ensure user data cannot control the URLs, or consider using the 'requests' library instead.
24┆ with urllib.request.urlopen(req, timeout=TIMEOUT) as resp:
results uploaded