XR008

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2023 License: MPL-2.0 Imports: 3 Imported by: 2

README

XR008

The XR008 analyzer reports usage of the os/exec.CommandContext() function. Providers that are using Go language based SDKs likely want to prevent any execution of other binaries for various reasons such as security and unexpected requirements (e.g. tool installation outside Terraform).

Flagged Code

var sneaky = exec.CommandContext

sneaky("evilprogram")

exec.CommandContext("evilprogram")

Passing Code

// Not present :)

Ignoring Reports

Singular reports can be ignored by adding the a //lintignore:XR008 Go code comment at the end of the offending line or on the line immediately proceding, e.g.

//lintignore:XR008
exec.CommandContext("evilprogram")

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL