Add function to read sensitive data from .sensitive.json file

- Implemented GetSensitiveData function to load sensitive data from a JSON file.
- Added error handling for missing file scenario.
This commit is contained in:
암냥 2025-06-18 21:42:06 +09:00
commit 1b65693ba5
6 changed files with 77 additions and 13 deletions

View file

@ -20,6 +20,7 @@ from lib.utils.backend_client import notify_backend
from lib.utils.browser_use import model
from lib.utils.browser_use.clean_resources import clean_resources
from lib.utils.browser_use.func import setup_storage_state
from lib.utils.browser_use.sensitive_data import GetSensitiveData
from lib.utils.config import BACKEND_URL, GOOGLE_MODEL, GOOGLE_PLANNER_MODEL
from lib.utils.is_html import is_html_url
from lib.utils.read_txt import read_lines_between
@ -114,6 +115,7 @@ async def scan_one_url(url: str, skip_html_check: bool = False):
agent = Agent(
browser_session=session,
initial_actions=initial_actions,
sensitive_data=GetSensitiveData(),
task=(
"Navigate to the login page, identify all OAuth provider buttons (excluding Passkey), "
"and for each one: click the button, follow the full OAuth login flow as far as possible "