├── CODEOWNERS ├── codeql-workspace.yml ├── .gitignore ├── .gitmodules ├── codeql-custom-queries-cpp ├── codeql-pack.lock.yml ├── example.ql └── qlpack.yml ├── codeql-custom-queries-go ├── codeql-pack.lock.yml ├── example.ql └── qlpack.yml ├── codeql-custom-queries-csharp ├── codeql-pack.lock.yml ├── example.ql └── qlpack.yml ├── codeql-custom-queries-java ├── codeql-pack.lock.yml ├── example.ql └── qlpack.yml ├── codeql-custom-queries-python ├── codeql-pack.lock.yml ├── example.ql └── qlpack.yml ├── codeql-custom-queries-ruby ├── codeql-pack.lock.yml ├── example.ql └── qlpack.yml ├── codeql-custom-queries-javascript ├── codeql-pack.lock.yml ├── example.ql └── qlpack.yml ├── .devcontainer └── devcontainer.json ├── vscode-codeql-starter.code-workspace ├── .github └── workflows │ ├── mirror-main-to-master.yml │ ├── report-failure.yml │ ├── check-submodule-pointers.yml │ └── update-codeql-submodule.yml ├── LICENSE.md ├── CONTRIBUTING.md ├── README.md └── CODE_OF_CONDUCT.md /CODEOWNERS: -------------------------------------------------------------------------------- 1 | **/* @github/codeql-experiences 2 | -------------------------------------------------------------------------------- /codeql-workspace.yml: -------------------------------------------------------------------------------- 1 | provide: 2 | - "**" 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # CodeQL compilation caches 2 | .cache/ 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ql"] 2 | path = ql 3 | url = https://github.com/github/codeql.git 4 | branch = lgtm.com 5 | -------------------------------------------------------------------------------- /codeql-custom-queries-cpp/codeql-pack.lock.yml: -------------------------------------------------------------------------------- 1 | --- 2 | lockVersion: 1.0.0 3 | dependencies: {} 4 | compiled: false 5 | -------------------------------------------------------------------------------- /codeql-custom-queries-go/codeql-pack.lock.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: {} 3 | compiled: false 4 | lockVersion: 1.0.0 5 | -------------------------------------------------------------------------------- /codeql-custom-queries-csharp/codeql-pack.lock.yml: -------------------------------------------------------------------------------- 1 | --- 2 | lockVersion: 1.0.0 3 | dependencies: {} 4 | compiled: false 5 | -------------------------------------------------------------------------------- /codeql-custom-queries-java/codeql-pack.lock.yml: -------------------------------------------------------------------------------- 1 | --- 2 | lockVersion: 1.0.0 3 | dependencies: {} 4 | compiled: false 5 | -------------------------------------------------------------------------------- /codeql-custom-queries-python/codeql-pack.lock.yml: -------------------------------------------------------------------------------- 1 | --- 2 | lockVersion: 1.0.0 3 | dependencies: {} 4 | compiled: false 5 | -------------------------------------------------------------------------------- /codeql-custom-queries-ruby/codeql-pack.lock.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: {} 3 | compiled: false 4 | lockVersion: 1.0.0 5 | -------------------------------------------------------------------------------- /codeql-custom-queries-javascript/codeql-pack.lock.yml: -------------------------------------------------------------------------------- 1 | --- 2 | lockVersion: 1.0.0 3 | dependencies: {} 4 | compiled: false 5 | -------------------------------------------------------------------------------- /codeql-custom-queries-go/example.ql: -------------------------------------------------------------------------------- 1 | /** 2 | * @name Empty block 3 | * @kind problem 4 | * @problem.severity warning 5 | * @id go/example/empty-block 6 | */ 7 | 8 | import go 9 | 10 | from BlockStmt b 11 | where b.getNumStmt() = 0 12 | select b, "This is an empty block." 13 | -------------------------------------------------------------------------------- /codeql-custom-queries-cpp/example.ql: -------------------------------------------------------------------------------- 1 | /** 2 | * @name Empty block 3 | * @kind problem 4 | * @problem.severity warning 5 | * @id cpp/example/empty-block 6 | */ 7 | 8 | import cpp 9 | 10 | from BlockStmt b 11 | where b.getNumStmt() = 0 12 | select b, "This is an empty block." 13 | -------------------------------------------------------------------------------- /codeql-custom-queries-java/example.ql: -------------------------------------------------------------------------------- 1 | /** 2 | * @name Empty block 3 | * @kind problem 4 | * @problem.severity warning 5 | * @id java/example/empty-block 6 | */ 7 | 8 | import java 9 | 10 | from BlockStmt b 11 | where b.getNumStmt() = 0 12 | select b, "This is an empty block." 13 | -------------------------------------------------------------------------------- /codeql-custom-queries-python/example.ql: -------------------------------------------------------------------------------- 1 | /** 2 | * @name Empty scope 3 | * @kind problem 4 | * @problem.severity warning 5 | * @id python/example/empty-scope 6 | */ 7 | 8 | import python 9 | 10 | from Scope s 11 | where count(s.getAStmt()) = 0 12 | select s, "This is an empty scope." -------------------------------------------------------------------------------- /codeql-custom-queries-csharp/example.ql: -------------------------------------------------------------------------------- 1 | /** 2 | * @name Empty block 3 | * @kind problem 4 | * @problem.severity warning 5 | * @id csharp/example/empty-block 6 | */ 7 | 8 | import csharp 9 | 10 | from BlockStmt b 11 | where b.getNumberOfStmts() = 0 12 | select b, "This is an empty block." 13 | -------------------------------------------------------------------------------- /codeql-custom-queries-javascript/example.ql: -------------------------------------------------------------------------------- 1 | /** 2 | * @name Empty block 3 | * @kind problem 4 | * @problem.severity warning 5 | * @id javascript/example/empty-block 6 | */ 7 | 8 | import javascript 9 | 10 | from BlockStmt b 11 | where b.getNumStmt() = 0 12 | select b, "This is an empty block." 13 | -------------------------------------------------------------------------------- /codeql-custom-queries-ruby/example.ql: -------------------------------------------------------------------------------- 1 | /** 2 | * @name Empty block 3 | * @kind problem 4 | * @problem.severity warning 5 | * @id ruby/example/empty-block 6 | */ 7 | 8 | import ruby 9 | import codeql.ruby.AST 10 | 11 | from Block b 12 | where b.getNumberOfStatements() = 0 13 | select b, "This is an empty block." 14 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": "mcr.microsoft.com/devcontainers/base:ubuntu", 3 | "extensions": [ 4 | "github.vscode-codeql", 5 | "slevesque.vscode-zipexplorer" 6 | ], 7 | "postCreateCommand": "git submodule init && git submodule update --recursive", 8 | "settings": { 9 | "codeQL.runningQueries.memory": 2048 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /codeql-custom-queries-go/qlpack.yml: -------------------------------------------------------------------------------- 1 | # Change 'getting-started' to the name of a user or organization that you have write access to. 2 | name: getting-started/codeql-extra-queries-go 3 | version: 0.0.0 4 | dependencies: 5 | # This uses the latest version of the codeql/go-all library. 6 | # You may want to change to a more precise semver string. 7 | codeql/go-all: "*" 8 | -------------------------------------------------------------------------------- /codeql-custom-queries-cpp/qlpack.yml: -------------------------------------------------------------------------------- 1 | # Change 'getting-started' to the name of a user or organization that you have write access to. 2 | name: getting-started/codeql-extra-queries-cpp 3 | version: 0.0.0 4 | dependencies: 5 | # This uses the latest version of the codeql/cpp-all library. 6 | # You may want to change to a more precise semver string. 7 | codeql/cpp-all: "*" 8 | -------------------------------------------------------------------------------- /codeql-custom-queries-java/qlpack.yml: -------------------------------------------------------------------------------- 1 | # Change 'getting-started' to the name of a user or organization that you have write access to. 2 | name: getting-started/codeql-extra-queries-java 3 | version: 0.0.0 4 | dependencies: 5 | # This uses the latest version of the codeql/java-all library. 6 | # You may want to change to a more precise semver string. 7 | codeql/java-all: "*" 8 | -------------------------------------------------------------------------------- /codeql-custom-queries-python/qlpack.yml: -------------------------------------------------------------------------------- 1 | # Change 'getting-started' to a user name or organization that you have write access to 2 | name: getting-started/codeql-extra-queries-python 3 | version: 0.0.0 4 | dependencies: 5 | # This uses the latest version of the codeql/python-all library. 6 | # You may want to change to a more precise semver string. 7 | codeql/python-all: "*" 8 | -------------------------------------------------------------------------------- /codeql-custom-queries-ruby/qlpack.yml: -------------------------------------------------------------------------------- 1 | # Change 'getting-started' to the name of a user or organization that you have write access to. 2 | name: getting-started/codeql-extra-queries-ruby 3 | version: 0.0.0 4 | dependencies: 5 | # This uses the latest version of the codeql/ruby-all library. 6 | # You may want to change to a more precise semver string. 7 | codeql/ruby-all: "*" 8 | -------------------------------------------------------------------------------- /codeql-custom-queries-csharp/qlpack.yml: -------------------------------------------------------------------------------- 1 | # Change 'getting-started' to the name of a user or organization that you have write access to. 2 | name: getting-started/codeql-extra-queries-csharp 3 | version: 0.0.0 4 | dependencies: 5 | # This uses the latest version of the codeql/csharp-all library. 6 | # You may want to change to a more precise semver string. 7 | codeql/csharp-all: "*" 8 | -------------------------------------------------------------------------------- /codeql-custom-queries-javascript/qlpack.yml: -------------------------------------------------------------------------------- 1 | # Change 'getting-started' to a user name or organization that you have write access to 2 | name: getting-started/codeql-extra-queries-javascript 3 | version: 0.0.0 4 | dependencies: 5 | # This uses the latest version of the codeql/javascript-all library. 6 | # You may want to change to a more precise semver string. 7 | codeql/javascript-all: "*" 8 | -------------------------------------------------------------------------------- /vscode-codeql-starter.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "codeql-custom-queries-cpp" 5 | }, 6 | { 7 | "path": "codeql-custom-queries-csharp" 8 | }, 9 | { 10 | "path": "codeql-custom-queries-go" 11 | }, 12 | { 13 | "path": "codeql-custom-queries-java" 14 | }, 15 | { 16 | "path": "codeql-custom-queries-javascript" 17 | }, 18 | { 19 | "path": "codeql-custom-queries-python" 20 | }, 21 | { 22 | "path": "codeql-custom-queries-ruby" 23 | }, 24 | { 25 | "path": "ql" 26 | } 27 | ], 28 | "settings": { 29 | "omnisharp.autoStart": false 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.github/workflows/mirror-main-to-master.yml: -------------------------------------------------------------------------------- 1 | # The default branch is "main", but older checkouts may still use "master". 2 | # This workflow keeps "master" up to date with "main". 3 | name: Mirror main to master 4 | 5 | on: 6 | push: 7 | branches: [ main ] 8 | 9 | permissions: 10 | contents: write 11 | 12 | jobs: 13 | mirror-main-to-master: 14 | runs-on: ubuntu-latest 15 | if: github.repository == 'github/vscode-codeql-starter' 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | with: 20 | fetch-depth: 0 21 | 22 | - name: Push main to master 23 | run: git push origin main:master 24 | -------------------------------------------------------------------------------- /.github/workflows/report-failure.yml: -------------------------------------------------------------------------------- 1 | # Creates an issue when the submodule pointer check fails on the main branch. 2 | name: Report failure 3 | 4 | on: 5 | workflow_run: 6 | workflows: ['Check submodule pointers'] 7 | branches: [main] 8 | types: [completed] 9 | 10 | jobs: 11 | report-failure: 12 | runs-on: ubuntu-latest 13 | if: ${{ github.repository == 'github/vscode-codeql-starter' && github.event.workflow_run.conclusion == 'failure' }} 14 | permissions: 15 | issues: write 16 | steps: 17 | - name: Create issue 18 | env: 19 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 20 | WORKFLOW_RUN_URL: ${{ github.event.workflow_run.html_url }} 21 | run: | 22 | TODAY="$(date "+%Y-%m-%d")" 23 | gh issue create \ 24 | --repo "$GITHUB_REPOSITORY" \ 25 | --title "Submodule pointers out of date: $TODAY" \ 26 | --body "Submodule pointer check failed: $WORKFLOW_RUN_URL" 27 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 GitHub, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /.github/workflows/check-submodule-pointers.yml: -------------------------------------------------------------------------------- 1 | name: Check submodule pointers 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [ main ] 7 | pull_request: 8 | branches: [ main ] 9 | types: 10 | - opened 11 | - synchronize 12 | - ready_for_review 13 | - reopened 14 | schedule: 15 | - cron: '42 12 * * *' 16 | 17 | permissions: 18 | contents: read 19 | 20 | jobs: 21 | check-submodules: 22 | runs-on: ubuntu-latest 23 | if: github.repository == 'github/vscode-codeql-starter' 24 | steps: 25 | - uses: actions/checkout@v3 26 | 27 | - name: Compare submodule pointers to lgtm.com branch 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | run: | 31 | CODEQL_ACTUAL_SHA="$(git rev-parse @:./ql)" 32 | CODEQL_EXPECTED_SHA="$(gh api repos/github/codeql/git/ref/heads/lgtm.com --jq '.object.sha')" 33 | echo "The ql submodule currently points to $CODEQL_ACTUAL_SHA. The tip of the lgtm.com branch of github/codeql is $CODEQL_EXPECTED_SHA." 34 | if [ "$CODEQL_EXPECTED_SHA" != "$CODEQL_ACTUAL_SHA" ]; then 35 | echo "::error:: The ql submodule is out of date with the lgtm.com branch of github/codeql. Expected $CODEQL_EXPECTED_SHA, found $CODEQL_ACTUAL_SHA." 36 | exit 1 37 | fi 38 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | [fork]: https://github.com/github/vscode-codeql-starter/fork 4 | [pr]: https://github.com/github/vscode-codeql-starter/compare 5 | [style]: https://primer.style 6 | [code-of-conduct]: CODE_OF_CONDUCT.md 7 | 8 | Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. 9 | 10 | Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md). 11 | 12 | Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms. 13 | 14 | ## Submitting a pull request 15 | 16 | 0. [Fork][fork] and clone the repository 17 | 0. Make your change 18 | 0. Push to your fork and [submit a pull request][pr] 19 | 0. Pat yourself on the back and wait for your pull request to be reviewed and merged. 20 | 21 | Here are a few things you can do that will increase the likelihood of your pull request being accepted: 22 | 23 | - Follow the [style guide][style]. 24 | - Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. 25 | - Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). 26 | 27 | ## Resources 28 | 29 | - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) 30 | - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) 31 | - [GitHub Help](https://help.github.com) -------------------------------------------------------------------------------- /.github/workflows/update-codeql-submodule.yml: -------------------------------------------------------------------------------- 1 | # Ensures the `ql` submodule is up to date, creating a PR if necessary. 2 | name: Update CodeQL submodule 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | update-codeql-submodule: 8 | name: Update CodeQL submodule 9 | runs-on: ubuntu-latest 10 | permissions: 11 | contents: write 12 | pull-requests: write 13 | env: 14 | # Unique branch name for each run of this workflow. 15 | BRANCH_NAME: 'update-codeql-submodule-${{ github.run_id }}-${{ github.run_attempt }}' 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v3 19 | with: 20 | fetch-depth: 1 21 | submodules: recursive 22 | 23 | - name: Git config 24 | shell: bash 25 | run: | 26 | set -exu 27 | git config user.name "github-actions[bot]" 28 | git config user.email "41898282+github-actions[bot]@users.noreply.github.com" 29 | 30 | echo "Creating a new branch: ${BRANCH_NAME}" 31 | git checkout -b "${BRANCH_NAME}" 32 | 33 | echo "Fetching refs" 34 | # Explicitly unshallow and fetch to ensure the submodule's remote ref is available. 35 | pushd ql 36 | git fetch --unshallow origin +lgtm.com:refs/remotes/origin/lgtm.com # must match branch name in gitmodules 37 | popd 38 | 39 | - name: Update submodule 40 | id: update 41 | shell: bash 42 | run: | 43 | echo "CODEQL_SHA_BEFORE=$(git rev-parse @:./ql)" | tee -a "$GITHUB_ENV" 44 | 45 | echo "Updating CodeQL submodule" 46 | git submodule update --init --remote 47 | 48 | # Stage changes 49 | git add ql 50 | # Only commit if the working tree is not empty 51 | if [[ -n "$(git diff --stat --cached)" ]]; then 52 | echo "changed=true" | tee -a "$GITHUB_OUTPUT" 53 | echo "::notice::Submodule has changes to commit. Will create a PR." 54 | else 55 | echo "::notice::No changes to commit." 56 | fi 57 | 58 | - name: Commit change and create PR 59 | if: steps.update.outputs.changed == 'true' 60 | shell: bash 61 | env: 62 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 63 | run: | 64 | git commit -m "Update CodeQL submodule" 65 | CODEQL_SHA_AFTER="$(git rev-parse @:./ql)" 66 | echo "CODEQL_SHA_AFTER=$CODEQL_SHA_AFTER" 67 | git push origin "$BRANCH_NAME" 68 | gh pr create \ 69 | --title "Update CodeQL submodule" \ 70 | --body "Submodule pointer updated from github/codeql@${CODEQL_SHA_BEFORE} to github/codeql@${CODEQL_SHA_AFTER}." \ 71 | --draft \ 72 | --head "$BRANCH_NAME" -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vscode-codeql-starter 2 | 3 | A starter workspace to use with the [CodeQL extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=github.vscode-codeql). For more information, see the [`vscode-codeql` repo](https://github.com/github/vscode-codeql/). 4 | 5 | ## Instructions 6 | 7 | 1. Install [Visual Studio Code](https://code.visualstudio.com). 8 | 1. Install the [CodeQL extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=github.vscode-codeql). 9 | 1. Clone this repository to your computer. 10 | - Make sure to include the submodules, either by `git clone --recursive` or by `git submodule update --init --remote` after clone. 11 | - Use `git submodule update --remote` regularly to keep the submodules up to date. 12 | 1. In VS Code, click File > Open Workspace. Select the file `vscode-codeql-starter.code-workspace` in your checkout of this repository. 13 | 1. You will see several folders open in the left sidebar: 14 | - The `ql` folder contains the [open-source CodeQL standard libraries](https://github.com/github/codeql/tree/codeql-cli/latest) for C/C++, C#, Go, Java, JavaScript/Typescript, Python, and Ruby. It tracks the branch tagged `codeql-cli/latest` in https://github.com/github/codeql. You can run the standard queries from here, and browse the libraries. 15 | - The folders named `codeql-custom-queries-` are ready for you to start developing your own custom queries for each language, while using the standard libraries. There are some example queries to get you started. 16 | 1. Follow the [documentation for the CodeQL extension](https://docs.github.com/en/code-security/codeql-for-vs-code/) to learn how to set up the extension, add a database and run queries against it. Have fun! 17 | 18 | ## Using the `vscode-codeql-starter` in a private repository 19 | 20 | If you want to privately share your CodeQL queries with your teammates using this project as a template: 21 | 22 | 1. Create an empty, private project in the organization you want. 23 | 1. Clone this project locally: `git clone git@github.com:github/vscode-codeql-starter.git` 24 | 1. Add a remote to the local copy `git remote add my-org git@github.com:/vscode-codeql-starter.git` 25 | 1. Push the code to the new remote: `git push my-org main` 26 | 27 | GitHub does not allow private forks of public repositories. 28 | 29 | ## Contributing 30 | 31 | This project welcomes contributions. See [CONTRIBUTING.md](CONTRIBUTING.md) for details. 32 | 33 | ## Reporting issues 34 | 35 | Issues and suggestions should be reported in the [`vscode-codeql` repo](https://github.com/github/vscode-codeql/issues/new/choose). 36 | 37 | ## License 38 | 39 | This project is [licensed](LICENSE.md) under the MIT License. 40 | 41 | The CodeQL extension for Visual Studio Code is [licensed](https://github.com/github/vscode-codeql/blob/main/extensions/ql-vscode/LICENSE.md) under the MIT License. The version of CodeQL used by the CodeQL extension is subject to the [GitHub CodeQL Terms & Conditions](https://securitylab.github.com/tools/codeql/license). 42 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to make participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies within all project spaces, and it also applies when 49 | an individual is representing the project or its community in public spaces. 50 | Examples of representing a project or community include using an official 51 | project e-mail address, posting via an official social media account, or acting 52 | as an appointed representative at an online or offline event. Representation of 53 | a project may be further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at opensource@github.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq --------------------------------------------------------------------------------