feat: align install guides with the CLI and declare the documented action inputs - #111
Merged
lelia merged 3 commits intoSep 9, 2026
Conversation
…in the action - `socket-basics --version` prints the package version. - INPUT_VERBOSE, INPUT_CONSOLE_TABULAR_ENABLED and INPUT_CONSOLE_JSON_ENABLED are read from the environment and behave like the matching CLI flags; the action declares `verbose`, `console_tabular_enabled` and `console_json_enabled` inputs that map to them. - The action declares `jira_url` / `jira_project` (with `server` / `project` kept as aliases), `ms_sentinel_shared_key`, `opengrep_notification_method` and `trufflehog_notification_method` (`notification_method` kept as an alias). - The Sentinel and Sumo Logic notifiers read the parameter names declared in notifications.yaml, so CLI flags, action inputs and dashboard values reach them alongside the existing environment variables. - Tests keep action.yml, connectors.yaml and notifications.yaml in step. Refs CE-445 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…t variables Consistency pass across the GitHub Action, Docker and local installation guides (CE-445): - CLI examples use the flag names `socket-basics --help` prints, and a new Name Mapping table in docs/parameters.md lists every setting as CLI flag, action input, environment variable and JSON key. - Docker examples keep the facts file inside the workspace so the dashboard upload succeeds, add a recipe for PR comments outside GitHub Actions, and document the standard and -heavy image variants. - The GitHub Action guide reflects the bundled Trivy scanner, lists only declared inputs, and completes the Dockerfile auto-discovery example. - JSON keys, S3 variable names, --config precedence, CI entrypoint overrides, pre-commit image names, the Python 3.10 floor and the Socket CLI install path now match the code. - scripts/check_release_docs.py also verifies exact action release tags and the bundled scanner versions against the Dockerfile pins. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: OpenGrep notify input is overwritten
- OpenGrep and TruffleHog now store notify settings under unique config keys, so an empty Action TruffleHog input no longer wipes OpenGrep's notification_method.
Or push these changes by commenting:
@cursor push b321dc967d
Preview (b321dc967d)
diff --git a/socket_basics/connectors.yaml b/socket_basics/connectors.yaml
--- a/socket_basics/connectors.yaml
+++ b/socket_basics/connectors.yaml
@@ -145,7 +145,7 @@
env_variable: INPUT_ERLANG_SAST_ENABLED
type: bool
default: false
- - name: notification_method
+ - name: opengrep_notification_method
option: --opengrep-notify
description: "Notification method for OpenGrep (e.g., console, slack)"
env_variable: INPUT_OPENGREP_NOTIFICATION_METHOD
@@ -410,7 +410,7 @@
env_variable: INPUT_TRUFFLEHOG_EXCLUDE_DIR
type: str
default: ""
- - name: notification_method
+ - name: trufflehog_notification_method
option: --trufflehog-notify
description: "Notification method for TruffleHog (e.g., console, slack)"
env_variable: INPUT_TRUFFLEHOG_NOTIFICATION_METHOD
diff --git a/tests/test_notification_method_env.py b/tests/test_notification_method_env.py
new file mode 100644
--- /dev/null
+++ b/tests/test_notification_method_env.py
@@ -1,0 +1,43 @@
+"""OpenGrep and TruffleHog notify inputs must not share a config key.
+
+GitHub Actions always exports every ``runs.env`` entry, so an unset
+``trufflehog_notification_method`` arrives as ``INPUT_TRUFFLEHOG_NOTIFICATION_METHOD=""``.
+That empty string must not wipe a real OpenGrep notify setting.
+"""
+
+from socket_basics.core.config import load_config_from_env
+from socket_basics.core.notification.manager import NotificationManager
+
+NOTIFY_ENV_VARS = (
+ "INPUT_OPENGREP_NOTIFICATION_METHOD",
+ "INPUT_TRUFFLEHOG_NOTIFICATION_METHOD",
+ "INPUT_TRIVY_NOTIFICATION_METHOD",
+)
+
+
+def test_empty_trufflehog_action_input_does_not_wipe_opengrep_notify(monkeypatch):
+ for name in NOTIFY_ENV_VARS:
+ monkeypatch.delenv(name, raising=False)
+ monkeypatch.setenv("INPUT_OPENGREP_NOTIFICATION_METHOD", "slack")
+ # Unset Action inputs are forwarded as empty strings, not omitted.
+ monkeypatch.setenv("INPUT_TRUFFLEHOG_NOTIFICATION_METHOD", "")
+
+ config = load_config_from_env()
+
+ assert config.get("opengrep_notification_method") == "slack"
+ assert not config.get("trufflehog_notification_method")
+
+ nm = NotificationManager(
+ {
+ "notifiers": {
+ "slack": {
+ "module_path": "socket_basics.core.notification.slack_notifier",
+ "class": "SlackNotifier",
+ "parameters": [],
+ }
+ }
+ },
+ app_config=config,
+ )
+ nm.load_from_config()
+ assert any(getattr(n, "name", "") == "slack" for n in nm.notifiers)You can send follow-ups to the cloud agent here.
…lan draft to Linear - `--socket-org` is the CLI equivalent of the `socket_org` action input and the SOCKET_ORG environment variable. It is applied before the dashboard configuration lookup and wins over environment and JSON values. The API key stays environment-only. - The `workspace` and `GITHUB_API_URL` action inputs are removed. Neither had an effect: the scan root is always GITHUB_WORKSPACE, and GITHUB_API_URL is provided by the runner. Workflows that still set them get an "Unexpected input" warning and otherwise behave as before. - docs/alert-quality-improvement-plan.md was a planning draft from a hackathon branch rather than user documentation; it is removed here and tracked as CE-447. - Docs, name-mapping table and CHANGELOG updated accordingly. Refs CE-445 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 8ee7b62. Configure here.
lelia
added a commit
to dc-larsen/socket-basics
that referenced
this pull request
Sep 10, 2026
…ocketDev#111 and SocketDev#112 SocketDev#111 merged to main with its own [Unreleased] block, so the PR stopped being mergeable and GitHub could not compute a merge ref, which is why no pull_request workflow ran on the previous head. The two blocks are combined section by section (Added, Changed, Removed, Fixed); nothing else in the file differs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Socket Basics can be run as a GitHub Action, as a Docker image, or as a native install, and each surface spells the same setting differently (
--pythonon the CLI,python_sast_enabledas an action input,INPUT_PYTHON_SAST_ENABLEDin the environment). This PR brings the guides for all three paths into line with the current CLI,action.ymland configuration loader, adds a single reference table for translating between them, declares the action inputs the documentation already describes so they behave like the CLI flags, and adds the CLI flags the docs were missing.Changes
Documentation (
README.md,docs/)socket-basics --helpprints.docs/parameters.md: every setting as CLI flag, GitHub Action input, environment variable and JSON key, generated fromconnectors.yaml,notifications.yamlandaction.yml. Also clarifies that the API key is environment-only and that--reponames the repository, not the organization.docker run(GITHUB_TOKEN,GITHUB_REPOSITORY,GITHUB_PR_NUMBER); GitLab and Jenkins examples override the image entrypoint;--entrypointused for the bundled-tool version checks; an Image Variants section explaining the standard image and the-heavyvariant; guidance for large repositories and facts-file size.--configprecedence match the code; the local-install guide states the Python 3.10 requirement and the npm install path for the Socket CLI; bundled scanner versions and one action reference updated to current values; dead links toconfiguration.mdpoint at the parameters reference.docs/alert-quality-improvement-plan.md, a planning draft from a hackathon branch, is removed from the repository and tracked as CE-447 instead.Action and CLI
--versionand--socket-orgflags.--socket-orgis the CLI equivalent of thesocket_orginput /SOCKET_ORG; the API key remains environment-only by design.verbose,console_tabular_enabledandconsole_json_enabled, delivered asINPUT_VERBOSE/INPUT_CONSOLE_TABULAR_ENABLED/INPUT_CONSOLE_JSON_ENABLEDand honored from the environment like the matching CLI flags.jira_urlandjira_project(the names used in the docs;serverandprojectremain as aliases),ms_sentinel_shared_key(alias ofms_sentinel_key),opengrep_notification_methodandtrufflehog_notification_method(notification_methodremains as an alias).workspaceandGITHUB_API_URLaction inputs, which had no effect (the scan root is alwaysGITHUB_WORKSPACE;GITHUB_API_URLis provided by the runner). Workflows that still set them receive an "Unexpected input" warning and otherwise behave as before.notifications.yaml, so CLI flags, action inputs and dashboard values reach them alongside the existing environment variables.Tooling
scripts/check_release_docs.py(run byprep_release.pyand CI) also verifies that action references use an exact release tag and that TruffleHog, OpenGrep and Trivy versions quoted in the guides match the Dockerfile pins;--writeupdates both.action.ymlin step withconnectors.yaml/notifications.yaml(every parameter'sINPUT_*variable is produced, every env mapping references a declared input) and cover the new flags and notifier parameters.Testing
pytest: 363 passed.python3 scripts/check_release_docs.py --check: in sync (release 3.1.0; tool pins TruffleHog 3.96.0, OpenGrep 1.26.0, Trivy 0.73.0).socket-basics --version,--socket-organdINPUT_VERBOSE=trueverified end to end against the local install.uses: SocketDev/socket-basics@...reference is pinned tov3.1.0or<sha>.actions/runnersource.Release note
The new flags and inputs make this a minor release. Per the usual flow, version files are not bumped here; a follow-up release-prep PR (
prep_release.py --version 3.2.0) will do that after merge, and its docs sync now also covers the scanner pins.Fixes CE-445
Note
Medium Risk
Removes two action inputs (minor workflow breakage) and changes how org, logging, and SIEM/Sumo credentials are resolved across surfaces; behavior is mostly additive with aliases but misconfiguration could affect uploads and notifications.
Overview
Aligns how settings are exposed across the CLI, GitHub Action, environment variables, and JSON/dashboard config, with a generated name mapping in
docs/parameters.mdand broad guide updates so examples matchsocket-basics --helpand bundled Trivy behavior.CLI and config: Adds
--versionand--socket-org(API key stays env-only).INPUT_VERBOSE,INPUT_CONSOLE_TABULAR_ENABLED, andINPUT_CONSOLE_JSON_ENABLEDnow load like their CLI flags; mergedverbosecan raise log level after config merge.--socket-orgis passed into dashboard config loading and re-applied after merge.GitHub Action (
action.yml): New inputs for logging, Jira (jira_url/jira_projectwithserver/projectaliases), Sentinel (ms_sentinel_shared_key), and OpenGrep/TruffleHog notification methods. Removes no-opworkspaceandGITHUB_API_URLinputs (existing workflows get an “Unexpected input” warning only).Notifiers: Microsoft Sentinel and Sumo Logic read
ms_sentinel_*/sumologic_endpointfrom CLI, action inputs, and app config in addition to legacy env names.Tooling and tests:
check_release_docs.pyalso syncs Dockerfile scanner pins and exact action tags; new tests guardaction.yml↔ YAML parameter env mappings and the new flags/notifier params. Removes draftdocs/alert-quality-improvement-plan.md.Reviewed by Cursor Bugbot for commit 8ee7b62. Configure here.