Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c768f67

Browse files
committed
Clean up README
Restructured the change to the README. Instead of directly including the descriptions of the language inputs, added links to the inputs for each action.
1 parent 873c91c commit c768f67

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

README.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,24 @@ We recommend using default setup to configure CodeQL analysis for your repositor
1616

1717
You can also configure advanced setup for a repository to find security vulnerabilities in your code using a highly customizable code scanning configuration. For more information, see "[Configuring advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)" and "[Customizing your advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning)."
1818

19-
### Inputs
19+
### Actions
20+
21+
This repository contains several actions that enable you to analyze code in your repository using CodeQL and upload the analysis to GitHub Code Scanning. Actions in this repository also allow you to upload to GitHub analyses generated by any SARIF-producing SAST tool.
22+
23+
Actions for CodeQL analyses:
24+
25+
- `init`: Sets up CodeQL for analysis. For information about input parameters, see the [init action definition](https://github.com/github/codeql-action/blob/main/init/action.yml).
26+
- `analyze`: Finalizes the CodeQL database, runs the analysis, and uploads the results to Code Scanning. For information about input parameters, see the [analyze action definition](https://github.com/github/codeql-action/blob/main/analyze/action.yml).
27+
28+
Actions for uploading analyses generated by third-party tools:
2029

21-
The CodeQL Action supports various inputs to customize the analysis. Here are some important inputs:
30+
- `upload-sarif`: Uploads a SARIF file to Code Scanning. If you are using the `analyze` action, there is no reason to use this action as well. For information about input parameters, see the [upload-sarif action definition](https://github.com/github/codeql-action/blob/main/upload-sarif/action.yml).
2231

23-
- `config`: Path of the config file to use. This input allows you to specify a custom configuration file for the analysis.
24-
- `languages`: A comma-separated list of CodeQL languages to analyze.
25-
- `queries`: 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.
26-
- `packs`: Comma-separated list of packs to run. Reference a pack in the format `scope/name[@version]`. If `version` is not specified, then the latest version of the pack is used. By default, this overrides the same setting in a configuration file; prefix with "+" to use both sets of packs.
27-
- `db-location`: Path where CodeQL databases should be created. If not specified, a temporary directory will be used.
28-
- `ram`: The amount of memory in MB that can be used by CodeQL extractors.
29-
- `threads`: The number of threads that can be used by CodeQL extractors.
30-
- `source-root`: Path of the root source code directory, relative to $GITHUB_WORKSPACE.
32+
Actions with special purposes and unlikely to be used directly:
33+
34+
- `autobuild`: (Deprecated) Attempts to automatically build the code. Only used for analyzing languages that require a build. Use the `build-mode: autobuild` input in the `init` action instead. For information about input parameters, see the [autobuild action definition](https://github.com/github/codeql-action/blob/main/autobuild/action.yml).
35+
- `resolve-environment`: Attempts to infer a build environment suitable for automatic builds. For information about input parameters, see the [resolve-environment action definition](https://github.com/github/codeql-action/blob/main/resolve-environment/action.yml).
36+
- `start-proxy`: Starts an HTTP proxy server for downloading dependencies in private registries. For information about input parameters, see the [start-proxy action definition](https://github.com/github/codeql-action/blob/main/start-proxy/action.yml).
3137

3238
### Workflow Permissions
3339

@@ -41,16 +47,16 @@ The CodeQL Action supports different build modes for analyzing the source code.
4147
- `autobuild`: The database will be created by attempting to automatically build the source code. Available for all compiled languages.
4248
- `manual`: The database will be created by building the source code using a manually specified build command. To use this build mode, specify manual build steps in your workflow between the `init` and `analyze` steps. Available for all compiled languages.
4349

44-
### Actions
50+
#### Which build mode should I use?
51+
52+
Interpreted languages must use `none` for the build mode.
53+
54+
For compiled languages:
4555

46-
The CodeQL Action includes several actions that can be used in your workflows. Here are the available actions and how to use them:
56+
- `manual` build mode will typically produce the most precise results, but it is more difficult to set up and will cause the analysis to take slightly more time to run.
57+
- `autobuild` build mode is simpler to set up, but will only work for projects with generic build steps that can be guessed by the heuristics of the autobuild scripts. If `autobuild` fails, then you must switch to `manual` or `none`. If `autobuild` succeeds, then the results and run time will be the same as `manual` mode.
58+
- `none` build mode is also simpler to set up and is slightly faster to run, but there is a possibility that some alerts will be missed. This may happen if your repository does any code generation during compilation or if there are any dependencies downloaded from registries that the workflow does not have access to. `none` is not yet supported by C/C++, Swift, Go, or Kotlin.
4759

48-
- `init`: Sets up CodeQL for analysis. For more information, see the [init action documentation](https://github.com/github/codeql-action/blob/main/init/action.yml).
49-
- `autobuild`: Attempts to automatically build the code. For more information, see the [autobuild action documentation](https://github.com/github/codeql-action/blob/main/autobuild/action.yml).
50-
- `analyze`: Finalizes the CodeQL database and runs the analysis. For more information, see the [analyze action documentation](https://github.com/github/codeql-action/blob/main/analyze/action.yml).
51-
- `upload-sarif`: Uploads a SARIF file to Code Scanning. For more information, see the [upload-sarif action documentation](https://github.com/github/codeql-action/blob/main/upload-sarif/action.yml).
52-
- `resolve-environment`: Attempts to infer a build environment suitable for automatic builds. For more information, see the [resolve-environment action documentation](https://github.com/github/codeql-action/blob/main/resolve-environment/action.yml).
53-
- `start-proxy`: Starts an HTTP proxy server. For more information, see the [start-proxy action documentation](https://github.com/github/codeql-action/blob/main/start-proxy/action.yml).
5460

5561
## Supported versions of the CodeQL Action
5662

@@ -77,7 +83,7 @@ We typically release new minor versions of the CodeQL Action and Bundle when a n
7783
| `v2.22.1` | `2.14.6` | Enterprise Server 3.11 | Supports CodeQL Action v3, but did not ship with CodeQL Action v3. For more information, see "[Code scanning: deprecation of CodeQL Action v2](https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/#users-of-github-enterprise-server-311)." |
7884
| `v2.20.3` | `2.13.5` | Enterprise Server 3.10 | Does not support CodeQL Action v3. |
7985

80-
CodeQL Action v2 will stop receiving updates when GHES 3.11 is deprecated.
86+
CodeQL Action v2 will stop receiving updates when GHES 3.11 is deprecated.
8187

8288
See the full list of GHES release and deprecation dates at [GitHub Enterprise Server releases](https://docs.github.com/en/enterprise-server/admin/all-releases#releases-of-github-enterprise-server).
8389

autobuild/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'CodeQL: Autobuild'
2-
description: 'Attempt to automatically build code'
2+
description: '(Deprecated) Attempt to automatically build the code. Only used for analyzing languages that require a build. Use the `build-mode: autobuild` input in the `init` action instead.'
33
author: 'GitHub'
44
inputs:
55
token:

0 commit comments

Comments
 (0)