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

Added tmpPath variable for linux agents #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions marketplace.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ Run a specific version of tfsec.
inputs:
dir: ./terraform
```
### Specify the directory to download tfsec binnary and store resuls files on Linux agents, Default is /tmp/

```yaml
- task: tfsec@1
inputs:
tmpPath: /tmp/
```

### Skip publishing test results

Expand Down
2 changes: 1 addition & 1 deletion tfsec-task/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function run() {
try {
console.log("Finding correct tfsec version...")
let url = await getArtifactURL()
let tmpPath = "/tmp/"
let tmpPath = task.getInput("tmpPath", true)
let bin = "tfsec"
let chmodRequired = true;
if (os.platform() == "win32") {
Expand Down
8 changes: 8 additions & 0 deletions tfsec-task/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@
"defaultValue": "",
"required": false,
"helpMarkDown": "The specified directory will be scanned for problems"
},
{
"name": "tmpPath",
"type": "string",
"label": "The directory to download tfsec and store results files on Linux agents",
"defaultValue": "/tmp/",
"required": false,
"helpMarkDown": "The specified directory will used to download tfsec binary and store results files on Linux agents"
}
],
"execution": {
Expand Down