Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PA-12487 Don't create context on auth when importing a file #99

Merged
merged 7 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "soos-dast",
"version": "2.0.22",
"version": "2.0.23",
"description": "SOOS DAST - The affordable no limit web vulnerability scanner",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/zap_hooks/helpers/auth_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import logging

from src.zap_hooks.helpers.browser_storage import BrowserStorage
from src.zap_hooks.helpers.utilities import array_to_dict, log
from src.zap_hooks.helpers.utilities import array_to_dict, log, isUrl
from src.zap_hooks.model.log_level import LogLevel
from src.zap_hooks.helpers.logging import LoggingFilter
import src.zap_hooks.helpers.globals as globals
Expand Down Expand Up @@ -81,7 +81,7 @@ def setup_webdriver() -> webdriver.Chrome:
def authenticate(zap, target, config):
clear_driver = False
try:
if zap is not None:
if zap is not None and isUrl(target):
setup_context(zap, target, config)

if config.auth_login_url:
Expand Down
3 changes: 3 additions & 0 deletions src/zap_hooks/helpers/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ def is_serializable(value):
except (TypeError, OverflowError):
return False

def isUrl(url: str) -> bool:
SOOS-JAlvarez marked this conversation as resolved.
Show resolved Hide resolved
return url.startswith('http://') or url.startswith('https://')

Loading