Skip to content

Commit 66e8a24

Browse files
committed
Update readme to include information about external config files.
1 parent 625929c commit 66e8a24

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,16 @@ Use the `config-file` parameter of the `init` action to enable the configuration
107107
config-file: ./.github/codeql/codeql-config.yml
108108
```
109109

110-
The configuration file must be located within the local repository. For information on how to write a configuration file, see "[Using a custom configuration file](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#using-a-custom-configuration-file)."
110+
The configuration file can be located in a different repository. This is useful if you want to share the same configuration across multiple repositories. If the configuration file is in a private repository you can also specify an `external-repository-token` option. This should be a personal access token that has read access to any repositories containing referenced config files and queries.
111+
112+
```yaml
113+
- uses: github/codeql-action/init@v1
114+
with:
115+
config-file: owner/repo/codeql-config.yml@branch
116+
external-repository-token: ${{ secrets.EXTERNAL_REPOSITORY_TOKEN }}
117+
```
118+
119+
For information on how to write a configuration file, see "[Using a custom configuration file](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#using-a-custom-configuration-file)."
111120

112121
If you only want to customise the queries used, you can specify them in your workflow instead of creating a config file, using the `queries` property of the `init` action:
113122

0 commit comments

Comments
 (0)