Skip to content

Commit

Permalink
Merge branch 'main' of github.com:turbot/flowpipe-samples into add_ne…
Browse files Browse the repository at this point in the history
…w_user
  • Loading branch information
bigdatasourav committed Nov 28, 2023
2 parents 9b377d9 + eb722c2 commit 37613ac
Show file tree
Hide file tree
Showing 27 changed files with 87 additions and 154 deletions.
2 changes: 0 additions & 2 deletions deactivate_expired_aws_iam_access_keys/variables.fp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@ variable "slack_channel" {
variable "slack_token" {
type = string
description = "Slack app token used to authenticate to your Slack workspace."
// TODO: Add once supported
// sensitive = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ pipeline "deallocate_and_delete_unapproved_azure_vms" {
type = string
description = local.subscription_id_param_description
default = var.subscription_id
# TODO: Add once supported
#sensitive = true
}

param "resource_group" {
Expand All @@ -24,24 +22,18 @@ pipeline "deallocate_and_delete_unapproved_azure_vms" {
type = string
# description = local.tenant_id_param_description
default = var.tenant_id
# TODO: Add once supported
#sensitive = true
}

param "client_secret" {
type = string
description = local.client_secret_param_description
default = var.client_secret
# TODO: Add once supported
#sensitive = true
}

param "client_id" {
type = string
description = local.client_id_param_description
default = var.client_id
# TODO: Add once supported
#sensitive = true
}

param "tags_query" {
Expand Down
10 changes: 0 additions & 10 deletions deallocate_and_delete_unapproved_azure_vms/variables.fp
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,26 @@
variable "subscription_id" {
type = string
description = "Azure Subscription Id. Examples: a1b2c3d4-wxyz-5678-bbbb-4d3c2b1a0."
# TODO: Add once supported
#sensitive = true
}

variable "resource_group" {
type = string
description = "Azure Resource Group. Examples: my_resource_group."
# TODO: Add once supported
#sensitive = true
}

variable "tenant_id" {
type = string
description = "The Microsoft Entra ID tenant (directory) ID."
# TODO: Add once supported
#sensitive = true
}

variable "client_secret" {
type = string
description = "A client secret that was generated for the App Registration."
# TODO: Add once supported
#sensitive = true
}

variable "client_id" {
type = string
description = "The client (application) ID of an App Registration in the tenant."
# TODO: Add once supported
#sensitive = true
}

# Zendesk variables
Expand Down
8 changes: 0 additions & 8 deletions domains_review_through_multiple_sources/variables.fp
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
variable "apivoid_api_key" {
type = string
description = "API key to authenticate requests with APIVoid."
# TODO: Add once supported
# sensitive = true
}

variable "ip2location_api_key" {
type = string
description = "API key to authenticate requests with IP2Location."
# TODO: Add once supported
# sensitive = true
}

variable "urlscan_api_key" {
type = string
description = "API key to authenticate requests with Urlscan."
# TODO: Add once supported
# sensitive = true
}

variable "virustotal_api_key" {
type = string
description = "API key to authenticate requests with VirusTotal."
# TODO: Add once supported
# sensitive = true
}
4 changes: 0 additions & 4 deletions ip_profiler/variables.fp
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
variable "abuseipdb_api_key" {
type = string
description = "API key to authenticate requests with AbuseIPDB."
# TODO: Add once supported
# sensitive = true
}

variable "virustotal_api_key" {
type = string
description = "API key to authenticate requests with VirusTotal."
# TODO: Add once supported
# sensitive = true
}
18 changes: 1 addition & 17 deletions lookup_iocs/variables.fp
Original file line number Diff line number Diff line change
@@ -1,55 +1,39 @@
variable "abuseipdb_api_key" {
type = string
description = "API key to authenticate requests with AbuseIPDB."
# TODO: Add once supported
# sensitive = true
}

variable "apivoid_api_key" {
type = string
description = "API key to authenticate requests with APIVoid."
# TODO: Add once supported
# sensitive = true
}

variable "ip2location_api_key" {
type = string
description = "API key to authenticate requests with IP2Location."
# TODO: Add once supported
# sensitive = true
}

variable "urlscan_api_key" {
type = string
description = "API key to authenticate requests with Urlscan."
# TODO: Add once supported
# sensitive = true
}

variable "virustotal_api_key" {
type = string
description = "API key to authenticate requests with VirusTotal."
# TODO: Add once supported
# sensitive = true
}

variable "hunter_api_key" {
type = string
description = "API key to authenticate requests with Hunter."
# TODO: Add once supported
# sensitive = true
}

variable "kickbox_api_key" {
type = string
description = "API key to authenticate requests with Kickbox."
# TODO: Add once supported
# sensitive = true
}

variable "hybrid_analysis_api_key" {
type = string
description = "API key to authenticate requests with Hybrid Analysis."
# TODO: Add once supported
# sensitive = true
}
}
14 changes: 1 addition & 13 deletions notify_on_call_engineer_with_pagerduty/variables.fp
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
variable "pagerduty_api_token" {
type = string
description = "PagerDuty API token used for authentication, e.g., `y_NbAkKc66ryYTWUXYEu`."
// TODO: Add once supported
// sensitive = true
default = ""
}

variable "slack_api_token" {
type = string
description = "Slack app token used to authenticate to your Slack workspace."
// TODO: Add once supported
// sensitive = true
default = ""
}

variable "slack_channel" {
type = string
description = "Encoded ID or name of the Slack channel to send the message. Encoded ID is recommended. Examples: C1234567890, general, random"
# TODO: Add once supported
#sensitive = true
default = ""
}

variable "sendgrid_api_key" {
type = string
description = "The SendGrid access api_key to authenticate to the OpenAI APIs, e.g., `SG.ABCDEFGHIJ-a1b2c3d4e5f6g7h8i9j10k11l12m13n14o15p16q17r18s19t20u21v`."
// TODO: Add once supported
// sensitive = true
default = ""
}
}
2 changes: 1 addition & 1 deletion notify_slack_new_github_release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Notify a Slack channel when a new GitHub release is published.

## Usage

- Add your Slack API token and channel name to `flowpipe.pvars`
- Add your Slack API token and channel to `flowpipe.pvars`
- Start your Flowpipe server
- Get the trigger part of the webhook for the `notify_slack_new_github_release` trigger, e.g., `hook/notify_slack_new_github_release.trigger.http.github_webhook_release_events/5d488ba41b4cd34bb15dde8d2c2082b3e4fa99aa3cfddb33e037c2db4587d707`
- Add your [webhook](https://docs.github.com/en/webhooks/using-webhooks/creating-webhooks) to the GitHub repository:
Expand Down
4 changes: 2 additions & 2 deletions notify_slack_new_github_release/flowpipe.fpvars.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
slack_channel ="test-channel"
slack_token ="xoxp-12345-67890"
slack_channel = "test-channel"
slack_token = "xoxp-12345-67890"
5 changes: 2 additions & 3 deletions notify_slack_new_github_release/mod.fp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ mod "notify_slack_new_github_release" {

require {
mod "github.com/turbot/flowpipe-mod-slack" {
version = "0.0.1-rc.1"
version = "0.0.1-rc.2"
args = {
token = var.slack_token
channel = var.slack_channel
token = var.slack_token
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ pipeline "router_pipeline" {

param "slack_token" {
type = string
description = "Slack app token used to connect to the API."
description = "Authentication token bearing required scopes."
default = var.slack_token
}

param "slack_channel" {
type = string
description = "Channel containing the message to be updated."
description = "Channel, private group, or IM channel to send message to."
default = var.slack_channel
}

step "pipeline" "post_message" {
if = param.event == "release" && param.request_body.action == "published"

pipeline = slack.pipeline.chat_post_message
pipeline = slack.pipeline.post_message
args = {
token = param.slack_token
channel = param.slack_channel
message = "New release created by ${param.request_body.release.author.login}: ${param.request_body.release.html_url}"
}
}

output "message" {
value = step.pipeline.post_message.output.message
output "post_message_check" {
value = !is_error(step.pipeline.post_message) ? "Message sent to ${param.channel}" : "Error sending message: ${error_message(step.pipeline.post_message)}"
}
}
2 changes: 0 additions & 2 deletions notify_slack_new_github_release/variables.fp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ variable "slack_channel" {
variable "slack_token" {
type = string
description = "Slack app token used to authenticate to your Slack workspace."
// TODO: Add once supported
// sensitive = true
}
5 changes: 0 additions & 5 deletions notify_teams_gitlab_project_visibility/variables.fp
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# TODO: Remove all defaults once variables can be passed to mod dependencies properly
variable "gitlab_access_token" {
type = string
description = "GitLab personal, project, or group access token to authenticate to the API. Example: glpat-ABC123_456-789."
# TODO: Add once supported
#sensitive = true
}

variable "teams_access_token" {
description = "The Microsoft personal security access_token to authenticate to the Microsoft graph APIs."
type = string
# TODO: Add once supported
#sensitive = true
}

variable "team_id" {
Expand Down
17 changes: 3 additions & 14 deletions offboard_azuread_users/create_user_update_issue.fp
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,29 @@ pipeline "create_user_update_issue" {
title = "Update Azure AD user status"
description = "Raise jira issues to update Azure AD user status."

//Azure Setup

# Azure Setup
param "tenant_id" {
type = string
description = "The Microsoft Entra ID tenant (directory) ID."
default = var.tenant_id
# TODO: Add once supported
#sensitive = true
}

param "subscription_id" {
type = string
description = "Azure Subscription Id. Examples: d46d7416-f95f-4771-bbb5-529d4c766."
# TODO: Add once supported
#sensitive = true
default = var.subscription_id
default = var.subscription_id
}

param "client_secret" {
type = string
description = "A client secret that was generated for the App Registration."
default = var.client_secret
# TODO: Add once supported
#sensitive = true
}

param "client_id" {
type = string
description = "The client (application) ID of an App Registration in the tenant."
default = var.client_id
# TODO: Add once supported
#sensitive = true
}

param "user_id" {
Expand All @@ -46,12 +37,10 @@ pipeline "create_user_update_issue" {
description = "The account status to update for the user. Here you can assign values as 'enable' or 'disable' or 'delete' to raise respective issues in jira"
}

//Jira Setup
# Jira Setup
param "token" {
type = string
description = "API access token"
# TODO: Add once supported
# sensitive = true
default = var.token
}

Expand Down
Loading

0 comments on commit 37613ac

Please sign in to comment.