Skip to content

Merge main into releases/v2 #1669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ee44252
- Add new configuration Parameter
tgrall Mar 18, 2023
94786b3
update changelog
tgrall Mar 18, 2023
2f14134
fix linter issues
tgrall Mar 18, 2023
f81f527
Update README.md - typo
tgrall Mar 18, 2023
f1fb80a
Update README.md
tgrall Mar 18, 2023
34231cf
fix CI failure - check js
tgrall Mar 18, 2023
fe4a785
rename new parameter from configuration to config
tgrall Apr 1, 2023
18f1345
Merge branch 'main' into issue-1589-config-param
tgrall Apr 10, 2023
696504d
Accept change in PR
tgrall Apr 10, 2023
a9fb7d9
Update init/action.yml : PR review
tgrall Apr 10, 2023
d2950c1
Update README.md : during PR Review
tgrall Apr 10, 2023
c9f360d
Update README.md : during PR Review
tgrall Apr 10, 2023
0b75f47
Update CHANGELOG.md : during PR Review
tgrall Apr 10, 2023
b4e6f81
resolve comments from @henrymercer
tgrall Apr 10, 2023
fc374f5
remove the documentation about workflow parameters
tgrall Apr 10, 2023
f398a65
fix after review from @henrymercer
tgrall Apr 18, 2023
7b876ae
remove space from json string
tgrall Apr 18, 2023
47cec7a
add test with config file and input together
tgrall Apr 18, 2023
1cccbfc
Update changelog and version after v2.3.2
invalid-email-address Apr 27, 2023
e3395de
Update checked-in dependencies
invalid-email-address Apr 27, 2023
f31a31c
Merge pull request #1663 from github/mergeback/v2.3.2-to-main-f3feb00a
angelapwen Apr 27, 2023
824d18c
Merge remote-tracking branch 'upstream/main' into issue-1589-config-p…
aeisenberg Apr 28, 2023
234bada
Update default bundle to codeql-bundle-20230428
invalid-email-address May 1, 2023
40c9593
Add changelog note
invalid-email-address May 1, 2023
cba5616
Update CHANGELOG.md
aeisenberg May 1, 2023
d2f6dfd
Merge pull request #1665 from github/aeisenberg/config-param
aeisenberg May 1, 2023
b1b3d00
Add link to changenote for custom config
aeisenberg May 1, 2023
8ca5570
Merge pull request #1666 from github/aeisenberg/readme-update
aeisenberg May 1, 2023
3346195
Merge branch 'main' into update-bundle/codeql-bundle-20230428
dbartol May 3, 2023
f72bf5d
Fix workflow formatting
dbartol May 4, 2023
318bcc7
Merge pull request #1664 from github/update-bundle/codeql-bundle-2023…
dbartol May 4, 2023
140500d
Update changelog for v2.3.3
invalid-email-address May 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/__ml-powered-queries.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .github/workflows/__packaging-config-inputs-js.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .github/workflows/__packaging-config-js.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .github/workflows/__packaging-inputs-js.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CodeQL Action Changelog

## 2.3.3 - 04 May 2023

- Update default CodeQL bundle version to 2.13.1. [#1664](https://github.com/github/codeql-action/pull/1664)
- You can now configure CodeQL within your code scanning workflow by passing a `config` input to the `init` Action. See [Using a custom configuration file](https://aka.ms/code-scanning-docs/config-file) for more information about configuring code scanning. [#1590](https://github.com/github/codeql-action/pull/1590)

## 2.3.2 - 27 Apr 2023

No user facing changes.
Expand Down
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,38 @@ By default, this will override any queries specified in a config file. If you wi
queries: +<local-or-remote-query>,<another-query>
```

### Configuration via `config` input

You can alternatively configure CodeQL using the `config` input to the `init` Action. The value of this input must be a YAML string that follows the configuration file format documented at "[Using a custom configuration file](https://aka.ms/code-scanning-docs/config-file)."

#### Example configuration

```yaml
- uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config: |
disable-default-queries: true
queries:
- uses: security-extended
- uses: security-and-quality
query-filters:
- include:
tags: /cwe-020/
```


#### Sharing configuration across multiple repositories

You can use Actions or environment variables to share configuration across multiple repositories and to modify configuration without needing to edit the workflow file. In the following example, `vars.CODEQL_CONF` is an [Actions configuration variable](https://docs.github.com/en/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows):

```yaml
- uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config: ${{ vars.CODEQL_CONF }}
```

## Troubleshooting

Read about [troubleshooting code scanning](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning).

3 changes: 3 additions & 0 deletions init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ inputs:
db-location:
description: Path where CodeQL databases should be created. If not specified, a temporary directory will be used.
required: false
config:
description: Configuration passed as a YAML string in the same format as the config-file input. This takes precedence over the config-file input.
required: false
queries:
description: Comma-separated list of additional queries to run. By default, this overrides the same setting in a configuration file; prefix with "+" to use both sets of queries.
required: false
Expand Down
11 changes: 10 additions & 1 deletion lib/config-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/config-utils.js.map

Large diffs are not rendered by default.

Loading