Skip to content

Commit 5541331

Browse files
committed
Merge remote-tracking branch 'origin/main' into jjs/additional-notification-information
2 parents 41ed54a + a0787b7 commit 5541331

File tree

309 files changed

+5161
-4066
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

309 files changed

+5161
-4066
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ jobs:
186186
187187
# Check for any typos
188188
- name: Check for typos
189-
uses: crate-ci/typos@v1.24.6
189+
uses: crate-ci/typos@v1.26.0
190190
with:
191191
config: .github/workflows/typos.toml
192192

.github/workflows/scorecard.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: OpenSSF Scorecard
2+
on:
3+
branch_protection_rule:
4+
schedule:
5+
- cron: "27 7 * * 3" # A random time to run weekly
6+
push:
7+
branches: ["main"]
8+
9+
permissions: read-all
10+
11+
jobs:
12+
analysis:
13+
name: Scorecard analysis
14+
runs-on: ubuntu-latest
15+
permissions:
16+
# Needed to upload the results to code-scanning dashboard.
17+
security-events: write
18+
# Needed to publish results and get a badge (see publish_results below).
19+
id-token: write
20+
21+
steps:
22+
- name: "Checkout code"
23+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
24+
with:
25+
persist-credentials: false
26+
27+
- name: "Run analysis"
28+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
29+
with:
30+
results_file: results.sarif
31+
results_format: sarif
32+
repo_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_results: true
34+
35+
# Upload the results as artifacts.
36+
- name: "Upload artifact"
37+
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
38+
with:
39+
name: SARIF file
40+
path: results.sarif
41+
retention-days: 5
42+
43+
# Upload the results to GitHub's code scanning dashboard.
44+
- name: "Upload to code-scanning"
45+
uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
46+
with:
47+
sarif_file: results.sarif

.github/workflows/security.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
echo "image=$(cat "$image_job")" >> $GITHUB_OUTPUT
115115
116116
- name: Run Trivy vulnerability scanner
117-
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8
117+
uses: aquasecurity/trivy-action@f781cce5aab226378ee181d764ab90ea0be3cdd8
118118
with:
119119
image-ref: ${{ steps.build.outputs.image }}
120120
format: sarif

.github/workflows/typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pn = "pn"
2222
EDE = "EDE"
2323
# HELO is an SMTP command
2424
HELO = "HELO"
25+
LKE = "LKE"
2526

2627
[files]
2728
extend-exclude = [

.vscode/settings.json

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,37 @@
66
"ASKPASS",
77
"authcheck",
88
"autostop",
9+
"autoupdate",
910
"awsidentity",
1011
"bodyclose",
1112
"buildinfo",
1213
"buildname",
14+
"Caddyfile",
1315
"circbuf",
1416
"cliflag",
1517
"cliui",
1618
"codecov",
19+
"codercom",
1720
"coderd",
1821
"coderdenttest",
1922
"coderdtest",
2023
"codersdk",
2124
"contravariance",
2225
"cronstrue",
2326
"databasefake",
27+
"dbcrypt",
2428
"dbgen",
2529
"dbmem",
2630
"dbtype",
2731
"DERP",
2832
"derphttp",
2933
"derpmap",
34+
"devcontainers",
3035
"devel",
3136
"devtunnel",
3237
"dflags",
38+
"dogfood",
39+
"dotfiles",
3340
"drpc",
3441
"drpcconn",
3542
"drpcmux",
@@ -38,18 +45,22 @@
3845
"embeddedpostgres",
3946
"enablements",
4047
"enterprisemeta",
48+
"Entra",
4149
"errgroup",
4250
"eventsourcemock",
4351
"externalauth",
4452
"Failf",
4553
"fatih",
54+
"filebrowser",
4655
"Formik",
4756
"gitauth",
57+
"Gitea",
4858
"gitsshkey",
4959
"goarch",
5060
"gographviz",
5161
"goleak",
5262
"gonet",
63+
"googleclouddns",
5364
"gossh",
5465
"gsyslog",
5566
"GTTY",
@@ -63,9 +74,11 @@
6374
"initialisms",
6475
"ipnstate",
6576
"isatty",
77+
"jetbrains",
6678
"Jobf",
6779
"Keygen",
6880
"kirsle",
81+
"knowledgebase",
6982
"Kubernetes",
7083
"ldflags",
7184
"magicsock",
@@ -77,6 +90,7 @@
7790
"namesgenerator",
7891
"namespacing",
7992
"netaddr",
93+
"netcheck",
8094
"netip",
8195
"netmap",
8296
"netns",
@@ -93,13 +107,16 @@
93107
"opty",
94108
"paralleltest",
95109
"parameterscopeid",
110+
"portsharing",
96111
"pqtype",
97112
"prometheusmetrics",
98113
"promhttp",
99114
"protobuf",
100115
"provisionerd",
101116
"provisionerdserver",
102117
"provisionersdk",
118+
"psql",
119+
"ptrace",
103120
"ptty",
104121
"ptys",
105122
"ptytest",
@@ -114,6 +131,7 @@
114131
"Signup",
115132
"slogtest",
116133
"sourcemapped",
134+
"speedtest",
117135
"spinbutton",
118136
"Srcs",
119137
"stdbuf",
@@ -154,13 +172,15 @@
154172
"turnconn",
155173
"typegen",
156174
"typesafe",
175+
"unauthenticate",
157176
"unconvert",
158-
"Untar",
159-
"Userspace",
177+
"untar",
178+
"userspace",
160179
"VMID",
161180
"walkthrough",
162181
"weblinks",
163182
"webrtc",
183+
"websockets",
164184
"wgcfg",
165185
"wgconfig",
166186
"wgengine",
@@ -172,6 +192,7 @@
172192
"workspaceapps",
173193
"workspacebuilds",
174194
"workspacename",
195+
"workspaceproxies",
175196
"wsjson",
176197
"xerrors",
177198
"xlarge",

Makefile

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,9 @@ gen: \
495495
coderd/rbac/object_gen.go \
496496
codersdk/rbacresources_gen.go \
497497
site/src/api/rbacresourcesGenerated.ts \
498-
docs/admin/prometheus.md \
499-
docs/reference/cli/README.md \
500-
docs/admin/audit-logs.md \
498+
docs/admin/integrations/prometheus.md \
499+
docs/reference/cli/index.md \
500+
docs/admin/security/audit-logs.md \
501501
coderd/apidoc/swagger.json \
502502
.prettierignore.include \
503503
.prettierignore \
@@ -525,9 +525,9 @@ gen/mark-fresh:
525525
coderd/rbac/object_gen.go \
526526
codersdk/rbacresources_gen.go \
527527
site/src/api/rbacresourcesGenerated.ts \
528-
docs/admin/prometheus.md \
529-
docs/reference/cli/README.md \
530-
docs/admin/audit-logs.md \
528+
docs/admin/integrations/prometheus.md \
529+
docs/reference/cli/index.md \
530+
docs/admin/security/audit-logs.md \
531531
coderd/apidoc/swagger.json \
532532
.prettierignore.include \
533533
.prettierignore \
@@ -638,21 +638,20 @@ codersdk/rbacresources_gen.go: scripts/rbacgen/codersdk.gotmpl scripts/rbacgen/m
638638
site/src/api/rbacresourcesGenerated.ts: scripts/rbacgen/codersdk.gotmpl scripts/rbacgen/main.go coderd/rbac/object.go coderd/rbac/policy/policy.go
639639
go run scripts/rbacgen/main.go typescript > "$@"
640640

641-
642-
docs/admin/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
641+
docs/admin/integrations/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics
643642
go run scripts/metricsdocgen/main.go
644643
./scripts/pnpm_install.sh
645-
pnpm exec prettier --write ./docs/admin/prometheus.md
644+
pnpm exec prettier --write ./docs/admin/integrations/prometheus.md
646645

647-
docs/reference/cli/README.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
646+
docs/reference/cli/index.md: scripts/clidocgen/main.go examples/examples.gen.json $(GO_SRC_FILES)
648647
CI=true BASE_PATH="." go run ./scripts/clidocgen
649648
./scripts/pnpm_install.sh
650-
pnpm exec prettier --write ./docs/reference/cli/README.md ./docs/reference/cli/*.md ./docs/manifest.json
649+
pnpm exec prettier --write ./docs/reference/cli/index.md ./docs/reference/cli/*.md ./docs/manifest.json
651650

652-
docs/admin/audit-logs.md: coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
651+
docs/admin/security/audit-logs.md: coderd/database/querier.go scripts/auditdocgen/main.go enterprise/audit/table.go coderd/rbac/object_gen.go
653652
go run scripts/auditdocgen/main.go
654653
./scripts/pnpm_install.sh
655-
pnpm exec prettier --write ./docs/admin/audit-logs.md
654+
pnpm exec prettier --write ./docs/admin/security/audit-logs.md
656655

657656
coderd/apidoc/swagger.json: $(shell find ./scripts/apidocgen $(FIND_EXCLUSIONS) -type f) $(wildcard coderd/*.go) $(wildcard enterprise/coderd/*.go) $(wildcard codersdk/*.go) $(wildcard enterprise/wsproxy/wsproxysdk/*.go) $(DB_GEN_FILES) .swaggo docs/manifest.json coderd/rbac/object_gen.go
658657
./scripts/apidocgen/generate.sh

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
[![release](https://img.shields.io/github/v/release/coder/coder)](https://github.com/coder/coder/releases/latest)
2727
[![godoc](https://pkg.go.dev/badge/github.com/coder/coder.svg)](https://pkg.go.dev/github.com/coder/coder)
2828
[![Go Report Card](https://goreportcard.com/badge/github.com/coder/coder/v2)](https://goreportcard.com/report/github.com/coder/coder/v2)
29+
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9511/badge)](https://www.bestpractices.dev/projects/9511)
30+
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/coder/coder/badge)](https://api.securityscorecards.dev/projects/github.com/coder/coder)
2931
[![license](https://img.shields.io/github/license/coder/coder)](./LICENSE)
3032

3133
</div>
@@ -111,6 +113,7 @@ We are always working on new integrations. Please feel free to open an issue and
111113
- [**Module Registry**](https://registry.coder.com): Extend development environments with common use-cases
112114
- [**Kubernetes Log Stream**](https://github.com/coder/coder-logstream-kube): Stream Kubernetes Pod events to the Coder startup logs
113115
- [**Self-Hosted VS Code Extension Marketplace**](https://github.com/coder/code-marketplace): A private extension marketplace that works in restricted or airgapped networks integrating with [code-server](https://github.com/coder/code-server).
116+
- [**Setup Coder**](https://github.com/marketplace/actions/setup-coder): An action to setup coder CLI in GitHub workflows.
114117

115118
### Community
116119

coderd/insights_internal_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,17 @@ func Test_parseInsightsInterval_week(t *testing.T) {
179179
t.Parallel()
180180

181181
layout := insightsTimeLayout
182-
sydneyLoc, err := time.LoadLocation("Australia/Sydney") // Random location
182+
losAngelesLoc, err := time.LoadLocation("America/Los_Angeles") // Random location
183183
require.NoError(t, err)
184184

185-
now := time.Now().In(sydneyLoc)
185+
now := time.Now().In(losAngelesLoc)
186186
t.Logf("now: %s", now)
187187

188188
y, m, d := now.Date()
189-
today := time.Date(y, m, d, 0, 0, 0, 0, sydneyLoc)
189+
today := time.Date(y, m, d, 0, 0, 0, 0, losAngelesLoc)
190190
t.Logf("today: %s", today)
191191

192-
thisHour := time.Date(y, m, d, now.Hour(), 0, 0, 0, sydneyLoc)
192+
thisHour := time.Date(y, m, d, now.Hour(), 0, 0, 0, losAngelesLoc)
193193
t.Logf("thisHour: %s", thisHour)
194194
twoHoursAgo := thisHour.Add(-2 * time.Hour)
195195
t.Logf("twoHoursAgo: %s", twoHoursAgo)

docs/CONTRIBUTING.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,20 +247,23 @@ be applied selectively or to discourage anyone from contributing.
247247

248248
## Releases
249249

250-
Coder releases are initiated via [`./scripts/release.sh`](../scripts/release.sh)
250+
Coder releases are initiated via
251+
[`./scripts/release.sh`](https://github.com/coder/coder/blob/main/scripts/release.sh)
251252
and automated via GitHub Actions. Specifically, the
252-
[`release.yaml`](../.github/workflows/release.yaml) workflow. They are created
253-
based on the current [`main`](https://github.com/coder/coder/tree/main) branch.
253+
[`release.yaml`](https://github.com/coder/coder/blob/main/.github/workflows/release.yaml)
254+
workflow. They are created based on the current
255+
[`main`](https://github.com/coder/coder/tree/main) branch.
254256

255257
The release notes for a release are automatically generated from commit titles
256258
and metadata from PRs that are merged into `main`.
257259

258260
### Creating a release
259261

260262
The creation of a release is initiated via
261-
[`./scripts/release.sh`](../scripts/release.sh). This script will show a preview
262-
of the release that will be created, and if you choose to continue, create and
263-
push the tag which will trigger the creation of the release via GitHub Actions.
263+
[`./scripts/release.sh`](https://github.com/coder/coder/blob/main/scripts/release.sh).
264+
This script will show a preview of the release that will be created, and if you
265+
choose to continue, create and push the tag which will trigger the creation of
266+
the release via GitHub Actions.
264267

265268
See `./scripts/release.sh --help` for more information.
266269

@@ -315,6 +318,9 @@ Breaking changes can be triggered in two ways:
315318

316319
### Security
317320

321+
> If you find a vulnerability, **DO NOT FILE AN ISSUE**. Instead, send an email
322+
> to security@coder.com.
323+
318324
The
319325
[`security`](https://github.com/coder/coder/issues?q=sort%3Aupdated-desc+label%3Asecurity)
320326
label can be added to PRs that have, or will be, merged into `main`. Doing so

0 commit comments

Comments
 (0)