Upgrade to Pro — share decks privately, control downloads, hide ads and more …

10 Code Search Tricks for Open Source

Erika Heidi
February 10, 2022

10 Code Search Tricks for Open Source

Learn how to leverage Sourcegraph code search to improve onboarding and productivity in the context of open source software.

Talk presented at JSWorld Online on February 10, 2022.

Erika Heidi

February 10, 2022
Tweet

More Decks by Erika Heidi

Other Decks in Technology

Transcript

  1. 10 Code Search Tricks for Open Source Using Sourcegraph to

    improve onboarding and productivity in the context of OSS JSWorld Online 2021
  2. Sourcegraph Code Search • Search across millions of indexed open

    source repositories ◦ doesn't require an account • Search across your public and private repositories ◦ requires an account to sync your repos from multiple code hosts • Other options: Self hosted ◦ free up to 10 users
  3. 1. Find projects that welcome contributors Use case: you want

    to find a welcoming open source project to contribute to (ex: for Hacktoberfest)
  4. 2. Find welcoming projects in language or framework Use case:

    you want to find a welcoming open source project in your language or framework of choice to contribute to
  5. 3. Find projects relying on specific dependencies Use case: you

    want to find out which projects are relying on a library you wrote, and how they're using it
  6. 4. Find how an object is used across multiple repositories

    Use case: you want to use an undocumented function or method from an open source project and would like to see usage examples
  7. 5. Find exposed keys and secrets across repositories Use case:

    you want to check if any of your repositories contains exposed keys and secrets that were committed by mistake
  8. 6. Find usage of compromised dependencies Use case: you find

    out about a compromised package and want to check if the malicious code is included in any of your repositories
  9. 7. Audit an organization for outdated dependencies Use case: you

    want to check across repositories for dependencies with a specific version
  10. 8. Find code that is not up to language standards

    Use case: you want to audit one or multiple repositories for code that is not up to predefined standards and best practices
  11. 9. Search for recent changes in large or multiple projects

    Use case: you want to be on top of any new functionality or bug patches in a project you rely on
  12. 10. Find deprecated function calls across repositories Use case: you

    need to update a project to a newer version of a framework or language, but there might be breaking changes