go.lang.security.audit.xss.no-direct-write-to-responsewriter.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()'.

Open
github.com/l3montree-dev/devguard/cmd/devguard-scanner/sast
/builds/open-code/badgebackend/badge-api/pkg/api/handler/repository_handler.go
  • T

    Tim Bastin detected go.lang.security.audit.xss.no-direct-write-to-responsewriter.no-direct-write-to-responsewriter

Add a comment

Rule Details

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()'.

Copyright © 2025 L3montree GmbH and the DevGuard Contributors. All rights reserved. Version 667098114b5ef45c7830e7aa599604fa65eb818f