Skip to content

Commit dd80abe

Browse files
tmp
1 parent f733ccd commit dd80abe

3,323 files changed

Lines changed: 290395 additions & 260588 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.

.bazelignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ pkg/ui/workspaces/eslint-plugin-crdb/node_modules
1313
pkg/ui/workspaces/crdb-api-client/node_modules
1414
tmp
1515
vendor
16-
.claude/skills/engflow-artifacts

.bazelrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ build:crosslinuxs390x '--workspace_status_command=./build/bazelutil/stamp.sh -t
130130
build:crosslinuxs390x --config=crosslinuxs390xbase
131131
build:crosslinuxs390xbase --platforms=//build/toolchains:cross_linux_s390x
132132
build:crosslinuxs390xbase --config=cross
133-
build:crosslinuxppc64le '--workspace_status_command=./build/bazelutil/stamp.sh -t ppc64le-unknown-linux-gnu'
134-
build:crosslinuxppc64le --config=crosslinuxppc64lebase
135-
build:crosslinuxppc64lebase --platforms=//build/toolchains:cross_linux_ppc64le
136-
build:crosslinuxppc64lebase --config=cross
137133

138134
# devdarwinx86_64 is a legacy setting that implies `--config=dev`.
139135
build:devdarwinx86_64 --config=dev

.claude/agents/crdb-metric-reviewer.md

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

.claude/rules/redactability.md

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -35,45 +35,6 @@ defining a type that will appear in log or error output.
3535
Prefer `SafeFormatter` over `SafeValue` — it's more precise and doesn't
3636
require linter allowlist changes.
3737

38-
**Hash-based redaction:** CockroachDB supports hash-based redaction via
39-
`cockroachdb/redact`. Instead of replacing sensitive values with `×`,
40-
hashing produces a deterministic truncated hash (e.g. `‹2bd806c9›`),
41-
allowing correlation across log entries without exposing raw PII.
42-
43-
- Wrap values with the appropriate `Hash*` type for hash-based redaction.
44-
When hashing is enabled, the value is replaced by its hash; when
45-
disabled, it falls back to full redaction (`×`). Choose the type that
46-
matches your value:
47-
| Value type | Hash wrapper |
48-
|------------------|-----------------------|
49-
| `string` | `redact.HashString` |
50-
| `int64` | `redact.HashInt` |
51-
| `uint64` | `redact.HashUint` |
52-
| `float64` | `redact.HashFloat` |
53-
| `[]byte` | `redact.HashBytes` |
54-
| `byte` | `redact.HashByte` |
55-
| `rune` | `redact.HashRune` |
56-
- For custom types, implement the `redact.HashValue` marker interface so
57-
the redact package hashes them instead of replacing with `×`. Types implementing this interface should alias a base Go type — the hash is computed on the value's string representation during `Redact()`:
58-
```go
59-
type UserID string
60-
func (UserID) HashValue() {}
61-
var _ redact.HashValue = UserID("")
62-
```
63-
- Hashing is controlled globally via `redact.EnableHashing(salt)` /
64-
`redact.DisableHashing()`. In CockroachDB, this is configured through
65-
the log config (`redaction.hashing.enabled` / `redaction.hashing.salt`
66-
in `pkg/util/log/logconfig/config.go`).
67-
- Always provide a salt in production to resist brute-force reversal.
68-
- Regular unsafe values (not wrapped with a `Hash*` type or `HashValue`)
69-
are still fully redacted even when hashing is enabled — hashing is
70-
opt-in per value.
71-
72-
**When to use hash-based redaction:** use it for values where you need to
73-
correlate occurrences across log lines (e.g. usernames, session IDs) but
74-
must not expose the raw value. Do not use it for values that should never
75-
appear in any form (e.g. passwords, tokens).
76-
7738
**Testing:** nontrivial `SafeFormat` implementations need an `echotest`
7839
unit test to lock down both the redacted and unredacted output:
7940
```go
@@ -84,27 +45,4 @@ func TestMyType_SafeFormat(t *testing.T) {
8445
}
8546
```
8647
Run with `-rewrite` to generate the initial testdata file, then inspect
87-
it to verify markers appear around unsafe fields.
88-
89-
For hash-based redaction, verify both hashing-enabled and hashing-disabled
90-
outputs:
91-
```go
92-
func TestMyType_HashRedaction(t *testing.T) {
93-
redact.DisableHashing()
94-
t.Cleanup(redact.DisableHashing)
95-
96-
hashAlice := func() string {
97-
return string(redact.Sprintf("user=%s", redact.HashString("alice")).Redact())
98-
}
99-
100-
t.Run("hashing enabled", func(t *testing.T) {
101-
redact.EnableHashing([]byte("salt"))
102-
defer redact.DisableHashing()
103-
require.Equal(t, "user=‹dc663a1d›", hashAlice())
104-
})
105-
106-
t.Run("hashing disabled", func(t *testing.T) {
107-
require.Equal(t, "user=‹×›", hashAlice())
108-
})
109-
}
110-
```
48+
it to verify markers appear around unsafe fields.

.claude/settings.json

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

0 commit comments

Comments
 (0)