sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.46k stars 252 forks source link

Explain how Cody context respects code-host permissions #1462

Closed cbart closed 6 months ago

cbart commented 10 months ago

Explain exactly the path of respecting code-host permissions regarding to getting snippets into Cody context.

### Tasks
- [ ] Add testing to ensure Cody repo permissions handled properly
cbart commented 10 months ago

Slack: https://sourcegraph.slack.com/archives/C05405NC49H/p1697843731794539?thread_ts=1697843051.984089&cid=C05405NC49H

andreeleuterio commented 10 months ago

@cbart can we add a task to properly test cody repo permissions (including sub-repo permissions)?

cbart commented 10 months ago

Added a task here. I need to learn more about what's already present, and prioritize this.

cbart commented 10 months ago

Relevant thead: https://sourcegraph.slack.com/archives/C05FY86PHLM/p1697758876123089

dominiccooney commented 10 months ago

We can think about this in terms of context sources:

We could also do some mitigation in depth at the context sinks:

And we want to have these controls work at each of these sources and sinks: (Would love product input on whether these requirements are right:)

Context, threads on "codyignore": RFC 852, Slack.

slimsag commented 9 months ago

FYI, it is my understanding (based on what @chwarwick told me) that Repository permissions, including sub-repository permissions, are respected and the implementation was reviewed by Security. I had a peek at the code and this seems to be correct.

We could always use more tests, though. Should the issue title be changed to just reflect that aspect?

I also want to mention https://github.com/sourcegraph/sourcegraph/issues/58375 which is work Cody strat team is doing in Q4 to give more fine-grained control to admins.

github-actions[bot] commented 6 months ago

This issue is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days.