@@ -86,6 +86,7 @@ func generateReadmeDocs(readmePath string) error {
8686 updatedContent = replaceSection (updatedContent , "START AUTOMATED TOOLS" , "END AUTOMATED TOOLS" , toolsDoc )
8787
8888 // Write back to file
89+ // #nosec G703 - readmePath is controlled by command line flag, not user input
8990 err = os .WriteFile (readmePath , []byte (updatedContent ), 0600 )
9091 if err != nil {
9192 return fmt .Errorf ("failed to write README.md: %w" , err )
@@ -117,7 +118,8 @@ func generateRemoteServerDocs(docsPath string) error {
117118
118119 newContent := contentStr [:startIndex ] + startMarker + "\n " + toolsetsDoc + "\n " + endMarker + contentStr [endIndex + len (endMarker ):]
119120
120- return os .WriteFile (docsPath , []byte (newContent ), 0600 ) //#nosec G306
121+ // #nosec G306,G703 - docsPath is controlled by command line flag, not user input
122+ return os .WriteFile (docsPath , []byte (newContent ), 0600 )
121123}
122124
123125func generateToolsetsDoc (tsg * toolsets.ToolsetGroup ) string {
@@ -340,14 +342,14 @@ func generateRemoteToolsetsDoc() string {
340342 installLink := fmt .Sprintf ("[Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-%s&config=%s)" , name , installConfig )
341343 readonlyInstallLink := fmt .Sprintf ("[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-%s&config=%s)" , name , readonlyConfig )
342344
343- buf . WriteString ( fmt .Sprintf ( "| %-14s | %-48s | %-53s | %-218s | %-110s | %-288s |\n " ,
345+ fmt .Fprintf ( & buf , "| %-14s | %-48s | %-53s | %-218s | %-110s | %-288s |\n " ,
344346 formattedName ,
345347 description ,
346348 apiURL ,
347349 installLink ,
348350 fmt .Sprintf ("[read-only](%s)" , readonlyURL ),
349351 readonlyInstallLink ,
350- ))
352+ )
351353 }
352354
353355 return buf .String ()
0 commit comments