Skip to content

Commit 161974f

Browse files
authored
Update compiled-languages-csharp.md
1 parent b4c89a5 commit 161974f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

troubleshooting/codeql-builds/compiled-languages-csharp.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ Recommendations:
234234

235235
# Speed up C# Analysis
236236

237-
Start here: [CodeQL Docs - The build takes too long](https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow#the-build-takes-too-long).
237+
Start here: [CodeQL Docs - The build takes too long](https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/troubleshooting-code-scanning/analysis-takes-too-long).
238+
- notable to ensure you are using appropriately sized [hardware](https://gh.io/codeql-hardware)
239+
- are you scanning in a container or on a VM - [note these antipatterns](https://some-natalie.dev/blog/codeql-container-builds/#anti-patterns-to-avoid)
238240

239241

240242
## Optimization - Removing Code From Scans
@@ -264,6 +266,8 @@ Tip: ensure credentials to your private registries listed in your `nuget.config`
264266

265267
Alternatively, you might consider breaking up code into smaller chunks to scan. For example, a monorepo with many microservices would be a prime candidate to scan only the dependent code together. CodeQL has natural boundaries at the network layer - if a direct method call is not invoked then there is reduced value in scanning the code together. Consider specifying services by folder to scan together (vs ignore):
266268

269+
Microservice A config:
270+
267271
```yaml
268272
- uses: github/codeql-action/init@v3
269273
with:
@@ -280,7 +284,7 @@ Alternatively, you might consider breaking up code into smaller chunks to scan.
280284
with:
281285
category: "/language:${{matrix.language}}/MicroserviceA"
282286
```
283-
+
287+
Microservice B config:
284288

285289
```yaml
286290
- uses: github/codeql-action/init@v3
@@ -299,7 +303,7 @@ Alternatively, you might consider breaking up code into smaller chunks to scan.
299303
category: "/language:${{matrix.language}}/MicroserviceB"
300304
```
301305

302-
306+
- Consider using this pre-built action to scan individual apps inside your monorepo: https://github.com/advanced-security/monorepo-code-scanning-action
303307

304308
### `build-mode: autobuild` or `build-mode: manual`
305309

0 commit comments

Comments
 (0)