Skip to content

Commit

Permalink
add: more env variables and fix issue in normal export mode
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFustang committed Sep 23, 2024
1 parent 397e6e1 commit acfeca9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/droid/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ def droid_platform_config(args, config_path):
config["workspace_id"] = environ.get("DROID_AZURE_WORKSPACE_ID")
if environ.get("DROID_AZURE_WORKSPACE_NAME"):
config["workspace_name"] = environ.get("DROID_AZURE_WORKSPACE_NAME")
if environ.get("DROID_AZURE_SUBSCRIPTION_ID"):
config["subscription_id"] = environ.get("DROID_AZURE_SUBSCRIPTION_ID")
if environ.get("DROID_AZURE_RESOURCE_GROUP"):
config["resource_group"] = environ.get("DROID_AZURE_RESOURCE_GROUP")

except Exception:
raise Exception("Something unexpected happened...")

Expand Down
1 change: 1 addition & 0 deletions src/droid/platforms/sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ def create_rule(self, rule_content, rule_converted, rule_file):
client_workspaces = self.get_workspaces(credential, export_mode=True)
# TODO: Export to all customers
else:
credential = self.get_credentials()
client = SecurityInsights(credential, self._subscription_id)
try:
client.alert_rules.create_or_update(
Expand Down

0 comments on commit acfeca9

Please sign in to comment.