Skip to content

Commit dfd7b0c

Browse files
authored
Fix CodeQL (#347)
1 parent 347d8c9 commit dfd7b0c

File tree

3 files changed

+60
-19
lines changed

3 files changed

+60
-19
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,27 @@ updates:
33
- package-ecosystem: "nuget"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
7-
open-pull-requests-limit: 10
8-
groups:
9-
all-dependencies:
10-
patterns:
11-
- "*"
6+
interval: "daily"
7+
# Disable version update PRs; only Dependabot security updates create PRs.
8+
open-pull-requests-limit: 0
9+
ignore:
10+
# OrchardCore packages are pinned; never auto-update them.
11+
- dependency-name: "OrchardCore.*"
12+
- dependency-name: "SafeMode"
13+
- dependency-name: "TheAdmin"
14+
- dependency-name: "TheAgencyTheme"
15+
- dependency-name: "TheBlogTheme"
16+
- dependency-name: "TheComingSoonTheme"
17+
- dependency-name: "TheTheme"
1218

1319
- package-ecosystem: "npm"
1420
directory: "/"
1521
schedule:
16-
interval: "weekly"
17-
open-pull-requests-limit: 10
18-
groups:
19-
all-dependencies:
20-
patterns:
21-
- "*"
22+
interval: "daily"
23+
open-pull-requests-limit: 0
2224

2325
- package-ecosystem: "github-actions"
2426
directory: "/"
2527
schedule:
26-
interval: "weekly"
27-
open-pull-requests-limit: 10
28-
groups:
29-
all-dependencies:
30-
patterns:
31-
- "*"
28+
interval: "daily"
29+
open-pull-requests-limit: 0

.github/workflows/codeql.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "CodeQL Security Analysis"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: "25 14 * * 1"
10+
workflow_dispatch:
11+
12+
permissions:
13+
security-events: write
14+
contents: read
15+
16+
jobs:
17+
analyze:
18+
name: Analyze C#
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 60
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup .NET
27+
uses: actions/setup-dotnet@v4
28+
with:
29+
dotnet-version: "10.0.x"
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v3
33+
with:
34+
languages: csharp
35+
config-file: ./.github/codeql/codeql-config.yml
36+
37+
- name: Build solution
38+
run: dotnet build CrestApps.OrchardCore.slnx -c Release /p:NuGetAudit=false
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v3
42+
with:
43+
category: "/language:csharp"

src/Modules/CrestApps.OrchardCore.AI.Agent/Communications/SendEmailTool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,6 @@ protected override async ValueTask<object> InvokeCoreAsync(AIFunctionArguments a
125125
return "The email was sent successfully.";
126126
}
127127

128-
return $"The email was not sent successfully due to the following: {string.Join(' ', result.Errors.Values)}";
128+
return $"The email was not sent successfully due to the following: {string.Join(' ', result.Errors)}";
129129
}
130130
}

0 commit comments

Comments
 (0)