GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SINTEF/sourcegraph: Code Intelligence Platform

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

27,255 Commits
27,255 Commits

Folders and files

NameName
Last commit message
Last commit date
.aspect
.aspect
 
 
.buildkite
.buildkite
 
 
.github/workflows
.github/workflows
 
 
.vscode
.vscode
 
 
annotations
annotations
 
 
client
client
 
 
cmd
cmd
 
 
dev
dev
 
 
doc
doc
 
 
docker-images
docker-images
 
 
internal
internal
 
 
lib
lib
 
 
migrations
migrations
 
 
monitoring
monitoring
 
 
schema
schema
 
 
third-party-licenses
third-party-licenses
 
 
ui/assets
ui/assets
 
 
.bazelignore
.bazelignore
 
 
.bazelrc
.bazelrc
 
 
.bazelversion
.bazelversion
 
 
.browserslistrc
.browserslistrc
 
 
.dockerignore
.dockerignore
 
 
.editorconfig
.editorconfig
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.golangci-warn.yml
.golangci-warn.yml
 
 
.golangci.yml
.golangci.yml
 
 
.graphqlrc.yml
.graphqlrc.yml
 
 
.hadolint.yaml
.hadolint.yaml
 
 
.mailmap
.mailmap
 
 
.mocharc.js
.mocharc.js
 
 
.npmrc
.npmrc
 
 
.percy.yml
.percy.yml
 
 
.prettierignore
.prettierignore
 
 
.stylelintignore
.stylelintignore
 
 
.stylelintrc.json
.stylelintrc.json
 
 
.tool-versions
.tool-versions
 
 
.trivyignore
.trivyignore
 
 
BUILD.bazel
BUILD.bazel
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
WORKSPACE
WORKSPACE
 
 
babel.config.js
babel.config.js
 
 
doc.go
doc.go
 
 
flake.lock
flake.lock
 
 
flake.nix
flake.nix
 
 
gen.go
gen.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
graphql-schema-linter.config.js
graphql-schema-linter.config.js
 
 
gulpfile.js
gulpfile.js
 
 
jest.config.base.js
jest.config.base.js
 
 
jest.config.js
jest.config.js
 
 
lighthouserc.js
lighthouserc.js
 
 
mockgen.temp.yaml
mockgen.temp.yaml
 
 
mockgen.test.yaml
mockgen.test.yaml
 
 
mockgen.yaml
mockgen.yaml
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
postcss.config.js
postcss.config.js
 
 
prettier.config.js
prettier.config.js
 
 
renovate.json
renovate.json
 
 
sg.config.yaml
sg.config.yaml
 
 
shell.nix
shell.nix
 
 
svgo.config.js
svgo.config.js
 
 
tsconfig.all.json
tsconfig.all.json
 
 
tsconfig.bazel.json
tsconfig.bazel.json
 
 
tsconfig.eslint.json
tsconfig.eslint.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

SourceGraph Libre

This is a fork of SourceGraph with a few modifications:

  • It only contains the opensource code. The proprietary code is removed to make sure it's not used during compilation.
    • Please note that the git history is preserved. If you browse back in time you will see the proprietary code and you must respect its license.
  • It has a Oauth2 Proxy Mode allowing to fetch the user information from the HTTP headers.
    • See the documentation in the readme. Use carefully.
  • A docker image is provided.
    • ghcr.io/sintef/sourcegraph-server-libre:libre
  • Sending telemetry data to SourceGraph.com, such as number of users or number of repositories, is removed.
  • Updates are disabled by default.

Oauth2 Proxy Mode

Oauth2 Proxy is a software that can be used as a reverse proxy to authenticate users. You can use it to enable OAuth2 authentication on the opensource version of SourceGraph.

Security considerations

In this mode, disabled by default, the user information is fetched from the HTTP headers. This means that the user information is not verified by SourceGraph. You must only use this mode if you are sure that no direct access to SourceGraph is possible.

The headers are X-Forwarded-User, X-Forwarded-Email, and X-Forwarded-Preferred-Username. Make sure that no one can contact sourcegraph with these headers set, only your reverse proxy must be allowed to do so.

Configuration

To enable it in your SourceGraph deployment, you need to set the environment variable OAUTH2_PROXY_MODE to the string true.

Some identity provider provide terrible usernames, such as extremely long random strings. In such cases, you may prefer to use the email address as the username. To enable this mode, set the environment variable OAUTH2_PROXY_PREFER_EMAIL_TO_USERNAME to the string true.

For additionnal security, you can configure a OAUTH2_PROXY_SECRET_TOKEN environment variable with a random and safe secret. Then, only the queries containing the header X-Secret-Token with the same value will use the oauth2 proxy mode. You will have to configure your reverse proxy to add this header and you must not communicate this secret to users. This is only an additional security measure, it does not replace the need to make sure that no one can contact sourcegraph directly with these headers set.

The oauth2 proxy configuration will depend on your installation. It may look similar to the following example:

reverse_proxy = true
provider = "keycloak-oidc"
skip_provider_button = true
redirect_url = "https://sourcegraph.example.net/oauth2/callback"
oidc_issuer_url = "https://keycloak.example.net/realms/sourcegraph"
email_domains = ["example.net"]
upstreams = ["http://sourcegraph:7080/"]
client_id = "sourcegraph"
client_secret = "some secret"
cookie_secret = "some other secret"
...

API with authorisation tokens

SourceGraph also provide authorisation tokens to access the API. If you want to use the Visual Studio Code extension for example, you must use an authorisation token and you cannot use oauth2 authentication.

Infortunately it means that you cannot use these editor extensions if source graph is behind an oauth2 proxy.

However, you could expose sourcegraph directly without the oauth2 proxy on the /.api/* paths when an Authorization header is present for example. If you do so, make sure that the X-Forwarded-* headers are not set and cannot be sent by the users directly. You may want to use a reverse proxy such as Traefik or Nginx to achieve this.

No warranty included

This is not the official SourceGraph repository. This comes with no warranty nor support. It is not supported by SourceGraph nor SINTEF.

Please read the LICENSE file for more information.

About

Code Intelligence Platform

sourcegraph.com

Resources

Readme
Apache-2.0 license

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

55 stars

Watchers

0 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.