Skip to content

feat: Add Firebase plugin with Remote Config read support - #236

Draft
r-pedraza wants to merge 24 commits into
masterfrom
feat/firebase-plugin
Draft

feat: Add Firebase plugin with Remote Config read support#236
r-pedraza wants to merge 24 commits into
masterfrom
feat/firebase-plugin

Conversation

@r-pedraza

Copy link
Copy Markdown
Contributor

Pull Request

📝 Summary

Adds a new Firebase plugin to Titan that provides Google Cloud ADC authentication validation and Firebase Remote Config template reading capabilities. This is PR1 of the Firebase integration, establishing the foundation for future multi-brand Remote Config workflows.

🔧 Changes Made

  • Add titan-plugin-firebase package with FirebasePlugin class
  • Implement FirebaseClient with ADC authentication methods (is_available, get_active_account, get_adc_access_token)
  • Add Remote Config API client for reading templates with ETag support
  • Create firebase_login step for validating ADC sessions
  • Create firebase_status step for reporting authentication status
  • Create firebase_remoteconfig_get step for reading Remote Config templates
  • Add comprehensive plugin documentation (client API, workflow steps, built-in workflows)
  • Register Firebase plugin in official plugin refs and workflow step paths

🧪 Testing

  • Unit tests added/updated (poetry run pytest)
  • All tests passing (make test)
  • Manual testing with titan-dev

Unit tests cover FirebaseClient authentication methods, Remote Config API interactions, and all three workflow steps with various input combinations and error scenarios.

📊 Logs

  • No new log events
  • firebase_adc_available (DEBUG) — ADC availability check result
  • firebase_remoteconfig_get_ok (DEBUG) — project_id, etag, duration
  • firebase_remoteconfig_get_failed (DEBUG) — project_id, error, duration

✅ Checklist

  • Self-review done
  • Follows the project's logging rules (no secrets, no content in logs)
  • New and existing tests pass
  • Documentation updated if needed
  • Plugin documentation updated when plugin functions or parameters changed (Plugins > Git Plugin, GitHub Plugin, Jira Plugin)

@r-pedraza r-pedraza self-assigned this Jul 15, 2026
@wiz-c04d923138

wiz-c04d923138 Bot commented Jul 24, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 Low
Software Management Finding Software Management Findings -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

if module_name is None:
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

value = getattr(import_module(module_name, __name__), name)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low SAST Finding

Arbitrary Code Execution via Insecure Import (CWE-706)

More Details

The importlib.import_module() function in Python allows dynamically importing modules at runtime. If the module name is derived from untrusted user input, an attacker could potentially execute arbitrary code on the system by causing a malicious module to be loaded.

Attribute Value
Impact Medium
Likelihood Low

Remediation

The importlib.import_module() function in Python allows for dynamic code loading, which can be a security risk if the module name is derived from untrusted user input. An attacker could potentially exploit this vulnerability to execute arbitrary code on the system, leading to various security issues such as code injection, data tampering, or unauthorized access.

To fix this issue, avoid using dynamic values in importlib.import_module() or implement a strict whitelist of allowed module names. If dynamic module loading is necessary, validate and sanitize the input to ensure that only trusted and approved modules are loaded.

Code examples

# VULNERABLE CODE - Directly using user input for module loading
import importlib

user_input = input("Enter module name: ")
module = importlib.import_module(user_input)
# SECURE CODE - Using a whitelist of allowed modules
import importlib

ALLOWED_MODULES = ["module1", "module2", "module3"]

user_input = input("Enter module name: ")
if user_input in ALLOWED_MODULES:
    module = importlib.import_module(user_input)
else:
    print("Module not allowed")

Additional recommendations

  • Follow the principle of least privilege and only grant the minimum required permissions for module loading.
  • Implement input validation and sanitization techniques to prevent code injection attacks.
  • Consider using a secure coding framework or library that provides built-in protection against code injection vulnerabilities.
  • Adhere to the OWASP Top 10 security guidelines, specifically "A1:2021 - Broken Access Control" and "A3:2021 - Injection."
  • Regularly update and maintain the whitelist of allowed modules to ensure it remains secure and up-to-date.

Rule ID: WS-I013-PYTHON-00176


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

r-pedraza added 22 commits July 24, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant