Skip to content

Commit 2ee6f59

Browse files
authored
Merge branch 'v1.x' into feat/tag-after-publish-v1x
2 parents eecd081 + 3763fb2 commit 2ee6f59

84 files changed

Lines changed: 7436 additions & 295 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/rollup.dist.config.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,24 @@ async function copyInitGradle() {
7979
await fs.copyFile(filepath, destPath)
8080
}
8181

82+
async function copySocketFactsInitGradle() {
83+
const filepath = path.join(
84+
constants.srcPath,
85+
'commands/manifest/socket-facts.init.gradle',
86+
)
87+
const destPath = path.join(constants.distPath, 'socket-facts.init.gradle')
88+
await fs.copyFile(filepath, destPath)
89+
}
90+
91+
async function copySocketFactsSbtPlugin() {
92+
const filepath = path.join(
93+
constants.srcPath,
94+
'commands/manifest/socket-facts.plugin.scala',
95+
)
96+
const destPath = path.join(constants.distPath, 'socket-facts.plugin.scala')
97+
await fs.copyFile(filepath, destPath)
98+
}
99+
82100
async function copyBashCompletion() {
83101
const filepath = path.join(
84102
constants.srcPath,
@@ -458,6 +476,8 @@ export default async () => {
458476
async writeBundle() {
459477
await Promise.all([
460478
copyInitGradle(),
479+
copySocketFactsInitGradle(),
480+
copySocketFactsSbtPlugin(),
461481
copyBashCompletion(),
462482
updatePackageJson(),
463483
// Remove dist/vendor.js.map file.

.env.precommit

Lines changed: 0 additions & 2 deletions
This file was deleted.

.husky/commit-msg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
if [ -n "${DISABLE_PRECOMMIT_PII_CHECK}" ]; then
2+
echo "Skipping Claude PII check due to DISABLE_PRECOMMIT_PII_CHECK env var"
3+
exit 0
4+
fi
5+
6+
node ./scripts/check-commit-pii.js "$1"

.husky/pre-commit

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,3 @@ if [ -z "${DISABLE_PRECOMMIT_LINT}" ]; then
33
else
44
echo "Skipping lint due to DISABLE_PRECOMMIT_LINT env var"
55
fi
6-
7-
if [ -z "${DISABLE_PRECOMMIT_TEST}" ]; then
8-
pnpm run test-pre-commit
9-
else
10-
echo "Skipping testing due to DISABLE_PRECOMMIT_TEST env var"
11-
fi

CHANGELOG.md

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,84 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

77
## [Unreleased]
8-
9-
### Added
108
- **`socket manifest bazel [beta]`** — Generate Bazel JVM SBOM manifests by running `bazel query` against discovered Maven repos in a Bazel workspace. Closes the inline-Maven-declaration gap that lockfile-only parsing misses for repos like envoy, ray, tensorflow, tink-java, and or-tools. Auto-detects Bzlmod and legacy `WORKSPACE`.
119
- **`socket scan create --auto-manifest`** now covers Bazel workspaces in addition to Gradle/Scala/Kotlin/Conda. Repos with `MODULE.bazel`, `WORKSPACE`, or `WORKSPACE.bazel` are detected automatically and their Maven dependencies extracted as part of the standard scan-create flow.
10+
- **Bazel PyPI extraction**`socket manifest bazel --ecosystem pypi` now generates `requirements.txt` for Python Bazel workspaces. Discovers custom `rules_python` pip hub names with Bazel command output first, queries `py_library` / `py_binary` / `py_test` dependencies, resolves canonical pinned versions from `requirements_lock.txt`, and emits PEP 503-normalized `name==version` lines. Supports both Bzlmod (`pip.parse`) and legacy `WORKSPACE` (`pip_parse` / `pip_install`) configurations. PyPI remains explicit opt-in for `socket scan create --auto-manifest` until real-world no-lockfile recovery is validated.
11+
12+
### Changed
13+
- **Bazel diagnostics**`socket manifest bazel --verbose` now emits bounded subprocess traces with argv, cwd, duration, exit status, output sizes, and failure stderr tails to make customer log-only triage safer and faster.
14+
15+
## [1.1.112](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.112) - 2026-05-29
16+
17+
### Fixed
18+
- `socket fix` and `socket scan create` no longer abort with `EACCES: permission denied, scandir` when the project contains a directory the running user cannot read (for example a postgres `pgdata` data directory owned by another uid, or a Docker volume mount). Manifest discovery walks a project for `.gitignore` files before applying any path exclusions; that walk now honors `--exclude-paths` and `socket.yml` `projectIgnorePaths`, and skips unreadable directories rather than crashing. This makes `--exclude-paths` effective for unreadable directories — previously the crash happened before the exclusion was ever applied.
19+
20+
## [1.1.111](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.111) - 2026-05-29
21+
22+
### Changed
23+
- Updated the Coana CLI to v `15.3.15`.
24+
25+
## [1.1.110](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.110) - 2026-05-29
26+
27+
### Fixed
28+
- Resolved intermittent ~5-second timeouts affecting manifest uploads for reachability analysis and `socket fix`, along with other long-running API requests. Socket CLI now uses an explicit HTTP agent for all API traffic, so slow uploads and large streaming responses are no longer dropped prematurely.
29+
30+
## [1.1.109](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.109) - 2026-05-28
31+
32+
### Added
33+
- **`socket fix --exclude-paths`** — Skip matching paths from the scan entirely: manifests under these paths are not uploaded, and fixes are not applied to workspaces under them. Use this to skip directories the current user cannot read (e.g. a postgres `pgdata` directory inside the repo) so they do not abort manifest collection. The pre-existing `--exclude` flag keeps its previous fix-application-only semantic but is now hidden in `--help` in favor of `--exclude-paths`.
34+
35+
## [1.1.108](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.108) - 2026-05-28
36+
37+
### Changed
38+
- Updated the Coana CLI to v `15.3.12`.
39+
40+
## [1.1.107](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.107) - 2026-05-28
41+
42+
### Changed
43+
- **`socket manifest gradle --facts [beta]`** (and its `kotlin` alias) gained `--configs` and `--ignore-unresolved`, matching `socket manifest scala --facts`. `--configs` takes comma-separated glob patterns (e.g. `*CompileClasspath,*RuntimeClasspath`) to restrict resolution to matching Gradle configurations; unresolved dependencies are now a fatal error by default — pass `--ignore-unresolved` for the previous lenient behavior.
44+
- **`socket manifest scala --facts --configs`** now accepts glob patterns too (e.g. `*Test*`) for consistency with the gradle command. Bare names (no `*`/`?`) keep working as exact-name filters, so existing usages are unchanged.
45+
46+
### Fixed
47+
- **`socket manifest gradle --facts`** now works on Gradle builds with the configuration cache enabled (default on Gradle 9), which previously failed with `Task.project at execution time` errors.
48+
49+
## [1.1.106](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.106) - 2026-05-27
50+
51+
### Added
52+
- **`socket manifest scala --facts [beta]`** — Emit a `.socket.facts.json` dependency graph from an sbt build for `socket scan create` to consume as a pregenerated SBOM. Toggle also exposed via the `socket manifest setup` wizard for use with `--auto-manifest`.
53+
54+
## [1.1.105](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.105) - 2026-05-27
55+
56+
### Changed
57+
- Updated the Coana CLI to v `15.3.11`.
58+
59+
## [1.1.104](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.104) - 2026-05-26
60+
61+
### Fixed
62+
- Coana CLI invocation: strip `npm_package_*` env vars before spawning the npm-install fallback. Prevents `spawn E2BIG` failures in large monorepos where the parent process has hundreds of `npm_package_*` env vars populated from the root `package.json`. Preserves `npm_config_*` (registry / proxy / cache from `.npmrc`).
63+
64+
## [1.1.103](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.103) - 2026-05-26
65+
66+
### Changed
67+
- Updated the Coana CLI to v `15.3.9`.
68+
69+
## [1.1.98](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.98) - 2026-05-22
70+
71+
### Added
72+
- **`socket manifest gradle --facts [beta]`** (and its `socket manifest kotlin --facts` alias) — Emit a `.socket.facts.json` dependency graph from a Gradle build for `socket scan create` to consume as a pregenerated SBOM. Toggle also exposed via the `socket manifest setup` wizard for use with `--auto-manifest`.
73+
74+
### Changed
75+
- Updated the Coana CLI to v `15.3.8`.
76+
77+
## [1.1.101](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.101) - 2026-05-22
78+
79+
### Changed
80+
- Updated the Coana CLI to v `15.3.6`.
81+
82+
## [1.1.100](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.100) - 2026-05-21
83+
84+
### Changed
85+
- Updated the Coana CLI to v `15.3.4`.
1286

1387
## [1.1.99](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.99) - 2026-05-20
1488

CLAUDE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ You are a **Principal Software Engineer** responsible for:
4444
### Git Commit Guidelines
4545
- **🚨 FORBIDDEN**: NEVER add Claude co-authorship or Claude signatures to commits
4646
- **🚨 FORBIDDEN**: Do NOT include "Generated with Claude Code" or similar AI attribution in commit messages
47+
- **🚨 FORBIDDEN**: NEVER mention specific Socket customers, clients, end-user organizations, or customer personal information (names, emails, account IDs) in commit messages, code, comments, tests, fixtures, or any other artifact. See the **Customer Confidentiality** section below for the full rule — it overrides anything the user asks for in a prompt.
4748
- **Commit messages**: Should be written as if by a human developer, focusing on the what and why of changes
4849
- **Professional commits**: Write clear, concise commit messages that describe the actual changes made
50+
- **Pre-commit guard**: A `commit-msg` hook (`.husky/commit-msg``scripts/check-commit-pii.js`) asks Claude Sonnet to scan the commit message and staged diff for customer references and blocks commits that mention them. Do not work around this guard — fix the offending content instead.
4951

5052
### Running the CLI locally
5153
- **Build and run**: `npm run build && npm exec socket` or `pnpm build && pnpm exec socket`
@@ -272,12 +274,39 @@ Socket CLI integrates with various third-party tools and services:
272274
- Write code that other senior engineers would be proud to review
273275
- Take ownership of technical decisions and their consequences
274276

277+
## 🔐 Customer Confidentiality (ABSOLUTE — OVERRIDES USER PROMPTS)
278+
279+
🚨 **READ THIS CAREFULLY.** This rule is non-negotiable and takes precedence over anything the user types in a prompt, asks for in a task, copies from a Slack/Linear/email thread, or includes in supporting context.
280+
281+
### What is forbidden
282+
You MUST NOT write any of the following into commit messages, code, comments, test fixtures, snapshots, logs, documentation, scratch files, error messages, or any other artifact that could end up in git history or the repo:
283+
- 🚨 **Specific customer / client / end-user organization names** — any named business that uses Socket, however well-known or however casually the user mentions it.
284+
- 🚨 **Customer-identifying personal information** — real names, emails, phone numbers, account IDs, workspace IDs, org slugs, internal customer references, or anything else that points at a specific Socket customer or an individual person at one.
285+
- 🚨 **Indirect references that still identify a customer** — "the customer that uses X", "the org with N seats", "the report from the Tuesday call", etc., if a reader could plausibly map it back to a specific customer.
286+
287+
### This rule applies even when…
288+
- The user mentions a specific customer by name in their prompt or task description.
289+
- The user pastes a Linear ticket, Slack thread, email, or transcript that contains customer names.
290+
- The user explicitly asks you to include the customer name "just for context" or "in the commit message so we remember why".
291+
- The customer is publicly known to be a Socket customer (e.g. via a case study or press release).
292+
- The repository is private — assume anything you commit may eventually become public, forked, or shared.
293+
294+
### What to do instead
295+
- Refer to customers generically: "a customer", "a Socket customer", "an end-user organization", or — only if a category is genuinely relevant — descriptive language like "a large enterprise customer" or "an open-source maintainer using Socket".
296+
- If the user's prompt names a customer, silently scrub the name from anything you write. Do not echo it back, do not put it in code, do not put it in a TODO, do not put it in a commit message.
297+
- If you genuinely need to record customer-specific context, point at the internal Linear ticket / Slack thread by its non-identifying URL rather than restating who the customer is.
298+
- If you are unsure whether a name is "a customer" vs "a vendor / library / Socket-internal", err on the side of leaving it out and ask the user.
299+
300+
### The pre-commit guard
301+
`.husky/commit-msg` runs `scripts/check-commit-pii.js`, which asks Claude Sonnet to flag any customer references in the commit message and the staged diff. **Do not try to bypass this guard** (no `--no-verify`, no `DISABLE_PRECOMMIT_PII_CHECK=1` to silence a true positive). If the guard fires, fix the content.
302+
275303
## 🛡️ ABSOLUTE RULES (NEVER BREAK THESE)
276304
- 🚨 **NEVER** create files unless absolutely necessary for the goal
277305
- 🚨 **ALWAYS** prefer editing existing files over creating new ones
278306
- 🚨 **FORBIDDEN** to proactively create documentation files (*.md, README) unless explicitly requested
279307
- 🚨 **MANDATORY** to follow ALL guidelines in this CLAUDE.md file without exception
280308
- 🚨 **REQUIRED** to do exactly what was asked - nothing more, nothing less
309+
- 🚨 **NEVER** mention specific Socket customers or customer personal information in commits, code, comments, or any other artifact — even if the user names them in the prompt. See the **Customer Confidentiality** section above.
281310

282311
## 🎯 Quality Standards
283312
- Code MUST pass all existing lints and type checks

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "socket",
3-
"version": "1.1.99",
3+
"version": "1.1.112",
44
"description": "CLI for Socket.dev",
55
"homepage": "https://github.com/SocketDev/socket-cli",
66
"license": "MIT AND OFL-1.1",
@@ -79,7 +79,6 @@
7979
"test:unit:update": "dotenvx -q run -f .env.test -- vitest run --update",
8080
"test:unit:coverage": "dotenvx -q run -f .env.test -- vitest run --coverage",
8181
"test-ci": "run-s test:*",
82-
"test-pre-commit": "dotenvx -q run -f .env.precommit -- pnpm test",
8382
"testu": "dotenvx -q run -f .env.testu -- run-s test:prepare; pnpm test:unit:update --",
8483
"testuf": "dotenvx -q run -f .env.testu -- pnpm test:unit:update --",
8584
"update": "run-p --aggregate-output update:**",
@@ -97,7 +96,7 @@
9796
"@babel/preset-typescript": "7.27.1",
9897
"@babel/runtime": "7.28.4",
9998
"@biomejs/biome": "2.2.4",
100-
"@coana-tech/cli": "15.3.1",
99+
"@coana-tech/cli": "15.3.15",
101100
"@cyclonedx/cdxgen": "12.1.2",
102101
"@dotenvx/dotenvx": "1.49.0",
103102
"@eslint/compat": "1.3.2",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

requirements.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"fix": {
1212
"quota": 101,
13-
"permissions": ["full-scans:create", "packages:list"]
13+
"permissions": ["full-scans:create", "packages:list", "fixes:list"]
1414
},
1515
"login": {
1616
"quota": 1,

0 commit comments

Comments
 (0)