You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/github/collaborating-with-issues-and-pull-requests/about-comparing-branches-in-pull-requests.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ A two-dot diff compares two Git committish references, such as SHAs or OIDs (Obj
54
54
55
55
If you want to simulate a two-dot diff in a pull request and see a comparison between the most recent versions of each branch, you can merge the base branch into your topic branch, which updates the last common ancestor between your branches.
56
56
57
-
For more information about Git commands to compare changes, see "[Git diff options](https://git-scm.com/docs/git-diff#git-diff-emgitdiffemltoptionsgtltcommitgtltcommitgt--ltpathgt82308203)" from the _Pro Git_ book site.
57
+
For more information about Git commands to compare changes, see "[Git diff options](https://git-scm.com/docs/git-diff#git-diff-emgitdiffemltoptionsgtltcommitgtltcommitgt--ltpathgt82308203)" from the _Pro Git_ book site.
58
58
59
59
### Reasons diffs will not display
60
60
- You've exceeded the total limit of files or certain file types. For more information, see "[Limits for viewing content and diffs in a repository](/articles/limits-for-viewing-content-and-diffs-in-a-repository/#diff-limits)."
Copy file name to clipboardExpand all lines: content/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,52 @@ If your workflow does not contain a matrix called `language`, then {% data varia
130
130
with:
131
131
languages: cpp, csharp, python
132
132
```
133
+
{% if currentVersion == "free-pro-team@latest" %}
134
+
### Analyzing Python dependencies
135
+
136
+
For GitHub-hosted runners that use Linux only, the {% data variables.product.prodname_codeql_workflow %} will try to auto-install Python dependencies to give more results for the CodeQL analysis. You can control this behavior by specifying the `setup-python-dependencies` parameter for the action called by the "Initialize CodeQL" step. By default, this parameter is set to `true`:
137
+
138
+
- If the repository contains code written in Python, the "Initialize CodeQL" step installs the necessary dependencies on the GitHub-hosted runner. If the auto-install succeeds, the action also sets the environment variable `CODEQL_PYTHON` to the Python executable file that includes the dependencies.
139
+
140
+
- If the repository doesn't have any Python dependencies, or the dependencies are specified in an unexpected way, you'll get a warning and the action will continue with the remaining jobs. The action can run successfully even when there are problems interpreting dependencies, but the results may be incomplete.
141
+
142
+
Alternatively, you can install Python dependencies manually on any operating system. You will need to add `setup-python-dependencies` and set it to `false`, as well as set `CODEQL_PYTHON` to the Python executable that includes the dependencies, as shown in this workflow extract:
143
+
144
+
```yaml
145
+
jobs:
146
+
CodeQL-Build:
147
+
148
+
runs-on: ubuntu-latest
149
+
150
+
steps:
151
+
- name: Checkout repository
152
+
uses: actions/checkout@v2
153
+
with:
154
+
fetch-depth: 2
155
+
- name: Set up Python
156
+
uses: actions/setup-python@v2
157
+
with:
158
+
python-version: '3.x'
159
+
- name: Install dependencies
160
+
run: |
161
+
python -m pip install --upgrade pip
162
+
if [ -f requirements.txt ];
163
+
then pip install -r requirements.txt;
164
+
fi
165
+
# Set the `CODEQL-PYTHON` environment variable to the Python executable
Copy file name to clipboardExpand all lines: content/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-the-codeql-workflow.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,3 +114,12 @@ If you split your analysis into multiple workflows as described above, we still
114
114
#### Run only during a `schedule` event
115
115
116
116
If your analysis is still too slow to be run during `push` or `pull_request` events, then you may want to only trigger analysis on the `schedule` event. For more information, see "[Events](/actions/learn-github-actions/introduction-to-github-actions#events)."
117
+
118
+
{% if currentVersion == "free-pro-team@latest" %}
119
+
### Results differ between analysis platforms
120
+
121
+
If you are analyzing code written in Python, you may see different results depending on whether you run the {% data variables.product.prodname_codeql_workflow %} on Linux, macOS, or Windows.
122
+
123
+
On GitHub-hosted runners that use Linux, the {% data variables.product.prodname_codeql_workflow %} tries to install and analyze Python dependencies, which could lead to more results. To disable the auto-install, add `setup-python-dependencies: false` to the "Initialize CodeQL" step of the workflow. For more information about configuring the analysis of Python dependencies, see "[Analyzing Python dependencies](/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#analyzing-python-dependencies)."
0 commit comments