-
-
Notifications
You must be signed in to change notification settings - Fork 119
feat(go-server): add DuckDB security profiles #1151
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
Draft
derekperkins
wants to merge
39
commits into
main
Choose a base branch
from
codex/duckdb-hardening
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
849382d
feat(go-server): add function allowlist
derekperkins c094021
feat(go-server): expose function allowlist flag
derekperkins 8beb677
docs(go-server): document function allowlist
derekperkins aa374e6
test(go-server): cover allowlist transport gates
derekperkins a3bf41a
fix(go-server): tighten function allowlist validation
derekperkins ec98ac3
docs(go-server): clarify function allowlist boundaries
derekperkins bb6b781
fix(go-server): return nonzero on startup failures
derekperkins d5e9f39
fix(go-server): detect normalized qualified calls
derekperkins d468145
refactor(go-server): simplify allowlist validation
derekperkins 2665421
refactor(go-server): mirror blocklist validation
derekperkins 3c82868
refactor(go-server): share function list traversal
derekperkins 7c9b0b4
fix(go-server): count repeated function violations
derekperkins 83d240a
feat(go-server): add reviewed function inventories
derekperkins 8c58cc0
feat(go-server): default configured function allowlists
derekperkins ea4f038
feat(go-server): expose function allowlist defaults
derekperkins bf7521c
docs(go-server): document default function policy
derekperkins 7da5b64
docs(go-server): correct DuckDB prefix source link
derekperkins 16dd041
docs(go-server): document function inventory updates
derekperkins d21e711
fix(go-server): complete reviewed function defaults
derekperkins 4a85baa
refactor(go-server): extract function inventories
derekperkins 91a7675
feat(go-server): add core extension function sets
derekperkins 1ef7c94
docs(go-server): describe curated reader views
derekperkins 651b3b3
refactor(go-server): model core extension function sets
derekperkins 25f5b98
feat(go-server): classify core extension functions
derekperkins 7fd2701
feat(go-server): enable extension compute defaults
derekperkins 7752d6a
docs(go-server): document extension function groups
derekperkins e305128
refactor(go-server): split extension inventories by extension
derekperkins 656eb8e
refactor(go-server): simplify function allowlist CLI
derekperkins f61e183
docs(go-server): scope function inventory guidance
derekperkins ac2b996
docs(go-server): defer network prefix guidance
derekperkins 3db0eae
docs(go-server): simplify function policy guidance
derekperkins a79eedc
docs(go-server): clarify function policy operations
derekperkins eff3e77
fix(go-server): complete UI function inventory
derekperkins 054ecaa
feat(go-server): add DuckDB security profiles
derekperkins 0340dd4
test(go-server): cover DuckDB security profiles
derekperkins 29aafc3
docs(go-server): document security profiles
derekperkins 56f6354
fix(go-server): scope profile initialization per connector
derekperkins 11fbad9
docs(go-server): clarify hardening profile tradeoffs
derekperkins c8abd68
fix(go-server): compose hardening with allowlist defaults
derekperkins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| package main | ||
|
|
||
| import "strings" | ||
|
|
||
| type optionalCommaListFlag struct { | ||
| values []string | ||
| set bool | ||
| } | ||
|
|
||
| func (f *optionalCommaListFlag) Set(value string) error { | ||
| f.set = true | ||
| if value != "" { | ||
| f.values = append(f.values, strings.Split(value, ",")...) | ||
| } | ||
| return nil | ||
| } | ||
|
|
||
| func (f *optionalCommaListFlag) String() string { | ||
| return strings.Join(f.values, ",") | ||
| } | ||
|
|
||
| type repeatedStringFlag struct { | ||
| values []string | ||
| } | ||
|
|
||
| func (f *repeatedStringFlag) Set(value string) error { | ||
| f.values = append(f.values, value) | ||
| return nil | ||
| } | ||
|
|
||
| func (f *repeatedStringFlag) String() string { | ||
| return strings.Join(f.values, ",") | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package main | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/stretchr/testify/assert" | ||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestOptionalCommaListFlag(t *testing.T) { | ||
| var flag optionalCommaListFlag | ||
|
|
||
| assert.False(t, flag.set) | ||
| assert.Empty(t, flag.values) | ||
|
|
||
| require.NoError(t, flag.Set("md5,range")) | ||
| require.NoError(t, flag.Set("+")) | ||
| assert.True(t, flag.set) | ||
| assert.Equal(t, []string{"md5", "range", "+"}, flag.values) | ||
| assert.Equal(t, "md5,range,+", flag.String()) | ||
| } | ||
|
|
||
| func TestOptionalCommaListFlagPreservesExplicitEmpty(t *testing.T) { | ||
| var flag optionalCommaListFlag | ||
|
|
||
| require.NoError(t, flag.Set("")) | ||
| assert.True(t, flag.set) | ||
| assert.Empty(t, flag.values) | ||
| assert.Empty(t, flag.String()) | ||
| } | ||
|
|
||
| func TestRepeatedStringFlag(t *testing.T) { | ||
| var flag repeatedStringFlag | ||
|
|
||
| require.NoError(t, flag.Set("/srv/data,2026")) | ||
| require.NoError(t, flag.Set("/srv/other")) | ||
| assert.Equal(t, []string{"/srv/data,2026", "/srv/other"}, flag.values) | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.