-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Default Cleanup Action to
fetch_uri
and examples TTPs (#525)
Summary: Pull Request resolved: #525 Used `remove_path` action to implement default cleanup action for `fetch_uri` that removes the downloaded file. Also added `basic.yaml` and `proxy.yaml` examples under `example-ttps/actions/fetchuri`. Reviewed By: RoboticPrism Differential Revision: D69863376 fbshipit-source-id: 26721c688d0aba4550ac5f856f144c8445c14c64
- Loading branch information
1 parent
427338f
commit a8cd351
Showing
3 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
api_version: 2.0 | ||
uuid: fe7f257f-19d2-4324-8590-bfddeb1156e2 | ||
name: fetch_uri_basic_example | ||
description: | | ||
This TTP shows you how to use the fetch action type fetch files with an http request. | ||
steps: | ||
- name: Fetch Something | ||
fetch_uri: https://raw.githubusercontent.com/facebookincubator/TTPForge/refs/heads/main/README.md | ||
location: /tmp/ttpforge_fetch_uri_file_{{randAlphaNum 10}} | ||
cleanup: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
api_version: 2.0 | ||
uuid: 81af6d8f-0da9-49cd-8fff-8edd4adc7bfe | ||
name: fetch_uri_proxy_example | ||
description: | | ||
This TTP shows you how to use the fetch action type fetch files with an http request through an http proxy. | ||
steps: | ||
- name: Fetch Something Through Proxy | ||
fetch_uri: https://raw.githubusercontent.com/facebookincubator/TTPForge/refs/heads/main/README.md | ||
location: /tmp/ttpforge_fetch_uri_file_{{randAlphaNum 10}} | ||
proxy: http://localhost:8080 | ||
cleanup: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters