Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GoSec Test #258

Merged
merged 2 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/yaml/yaml_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
const SingleIndent = " "

func WriteYAMLFile(readFilePath string, blocks []structure.IBlock, writeFilePath string, tagsAttributeName string, resourcesStartToken string) error {
// read file bytes
// #nosec G304
// read file bytes
originFileSrc, err := ioutil.ReadFile(readFilePath)
if err != nil {
return fmt.Errorf("failed to read file %s because %s", readFilePath, err)
Expand Down
4 changes: 2 additions & 2 deletions src/terraform/structure/terraform_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ func (p *TerrraformParser) ValidFile(_ string) bool {
}

func (p *TerrraformParser) ParseFile(filePath string) ([]structure.IBlock, error) {
// read file bytes
// #nosec G304
// read file bytes
src, err := ioutil.ReadFile(filePath)
if err != nil {
return nil, fmt.Errorf("failed to read file %s because %s", filePath, err)
Expand Down Expand Up @@ -171,8 +171,8 @@ func (p *TerrraformParser) ParseFile(filePath string) ([]structure.IBlock, error
}

func (p *TerrraformParser) WriteFile(readFilePath string, blocks []structure.IBlock, writeFilePath string) error {
// read file bytes
// #nosec G304
// read file bytes
src, err := ioutil.ReadFile(readFilePath)
if err != nil {
return fmt.Errorf("failed to read file %s because %s", readFilePath, err)
Expand Down