Skip to content

fix(scanner): preserve option values - #125

Open
John-David Dalton (jdalton) wants to merge 1 commit into
mainfrom
fix/socket-tier1-exclude-args
Open

John-David Dalton (jdalton) wants to merge 1 commit into
mainfrom
fix/socket-tier1-exclude-args

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

LLM Description written by CODEX:GPT-6

Summary

Preserve commas in Socket Tier 1 additional parameter values while retaining the legacy comma separator before a new option. Document the supported repeated --exclude-paths form for Tier 1 scans.

Changes

  • Tokenize additional parameters with shell quoting and recognize only unquoted commas before hyphen-led options as legacy separators.
  • Report malformed shell quoting as a connector configuration error.
  • Document repeated exclusions, their Tier 1 scope, matching examples, and the Basics workspace default.
  • Add pure parser regression coverage for repeated flags, comma-list values, escaped and quoted commas, and malformed quoting.

Testing

  • /private/tmp/basics-ce83-venv/bin/python -m pytest tests/test_socket_tier1_additional_params.py (11 passed)
  • Black check and Flake8 on the new test module passed.
  • git diff --check passed.

This verifies argument parsing only; no end-to-end scan omission or published image behavior was tested.


Note

Medium Risk
Parsing behavior for existing SOCKET_ADDITIONAL_PARAMS strings changes (mostly fixes comma-in-value cases); misconfigured quotes now error instead of running with wrong CLI args passed to socket scan reach.

Overview
Socket Tier 1 socket_additional_params / SOCKET_ADDITIONAL_PARAMS parsing no longer splits on every comma. A new tokenizer keeps commas inside option values (including quoted values) and still treats an unquoted comma before another - flag as the legacy separator, then runs shlex splitting. Malformed quoting now fails fast with ConnectorExecutionError instead of silently mis-splitting args.

Docs and GitHub Action / connector descriptions are aligned: space-separated options, repeat list flags like --exclude-paths, and examples for excluding Tier 1 scan paths via CLI, env, or Action input. Regression tests cover repeated flags, comma-in-values, legacy --view=full,--all, escapes, and bad quotes.

Reviewed by Cursor Bugbot for commit bf09322. Configure here.

This branch was successfully deployed

1 active deployment
socket-firewall — bf093221 Deployed Oct 11, 2026 by jdalton via python-sfw-smoke-enterprise #154
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