Skip to content

Commit 7691912

Browse files
authored
Merge branch 'coder:main' into master
2 parents 3bd44a4 + be40eca commit 7691912

Some content is hidden

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

66 files changed

+835
-556
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
ci/helm-chart/ @Matthew-Beckett @alexgorbatchev
44

55
docs/install.md @GNUxeava
6+
7+
src/node/i18n/locales/zh-cn.json @zhaozhiming

.github/dependabot.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
time: "06:00"
8+
timezone: "America/Chicago"
9+
labels: []
10+
commit-message:
11+
prefix: "chore"
12+
13+
- package-ecosystem: "npm"
14+
directory: "/"
15+
schedule:
16+
interval: "monthly"
17+
time: "06:00"
18+
timezone: "America/Chicago"
19+
commit-message:
20+
prefix: "chore"
21+
labels: []
22+
ignore:
23+
# Ignore patch updates for all dependencies
24+
- dependency-name: "*"
25+
update-types:
26+
- version-update:semver-patch
27+
# Ignore major updates to Node.js types, because they need to
28+
# correspond to the Node.js engine version
29+
- dependency-name: "@types/node"
30+
update-types:
31+
- version-update:semver-major

.github/workflows/build.yaml

Lines changed: 13 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@ jobs:
139139
if: steps.changed-files.outputs.any_changed == 'true'
140140
run: yarn lint:ts
141141

142+
lint-actions:
143+
name: Lint GitHub Actions
144+
runs-on: ubuntu-latest
145+
steps:
146+
- name: Checkout repo
147+
uses: actions/checkout@v3
148+
- name: Check workflow files
149+
run: |
150+
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash)
151+
./actionlint -color -shellcheck= -ignore "set-output"
152+
shell: bash
153+
142154
test-unit:
143155
name: Run unit tests
144156
runs-on: ubuntu-20.04
@@ -271,65 +283,6 @@ jobs:
271283
name: npm-package
272284
path: ./package.tar.gz
273285

274-
npm:
275-
name: Publish npm package
276-
# the npm-package gets uploaded as an artifact in Build
277-
# so we need that to complete before this runs
278-
needs: build
279-
# This environment "npm" requires someone from
280-
# coder/code-server-reviewers to approve the PR before this job runs.
281-
environment: npm
282-
# Only run if PR comes from base repo or event is not a PR
283-
# Reason: forks cannot access secrets and this will always fail
284-
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
285-
runs-on: ubuntu-20.04
286-
steps:
287-
- name: Checkout repo
288-
uses: actions/checkout@v3
289-
290-
- name: Download artifact
291-
uses: actions/download-artifact@v3
292-
id: download
293-
with:
294-
name: "npm-package"
295-
path: release-npm-package
296-
297-
- name: Run ./ci/steps/publish-npm.sh
298-
run: yarn publish:npm
299-
env:
300-
# NOTE@jsjoeio
301-
# This is because npm enforces semantic versioning
302-
# so it has to be a valid version. We only use this
303-
# to publish dev versions from prs
304-
# and beta versions from main.
305-
VERSION: "0.0.0"
306-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
307-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
308-
# NOTE@jsjoeio
309-
# NPM_ENVIRONMENT intentionally not set here.
310-
# Instead, itis determined in publish-npm.sh script
311-
# using GITHUB environment variables
312-
313-
- name: Comment npm information
314-
uses: marocchino/sticky-pull-request-comment@v2
315-
with:
316-
GITHUB_TOKEN: ${{ github.token }}
317-
header: npm-dev-build
318-
message: |
319-
✨ code-server dev build published to npm for PR #${{ github.event.number }}!
320-
* _Last publish status_: success
321-
* _Commit_: ${{ github.event.pull_request.head.sha }}
322-
323-
To install in a local project, run:
324-
```shell-session
325-
npm install @coder/code-server-pr@${{ github.event.number }}
326-
```
327-
328-
To install globally, run:
329-
```shell-session
330-
npm install -g @coder/code-server-pr@${{ github.event.number }}
331-
```
332-
333286
test-e2e:
334287
name: Run e2e tests
335288
needs: build
@@ -443,7 +396,7 @@ jobs:
443396
if: steps.caddy-cache.outputs.cache-hit != 'true'
444397
run: |
445398
gh release download v2.5.2 --repo caddyserver/caddy --pattern "caddy_2.5.2_linux_amd64.tar.gz"
446-
mkdir -p ~/.cache/caddy
399+
mkdir -p ~/.cache/caddy
447400
tar -xzf caddy_2.5.2_linux_amd64.tar.gz --directory ~/.cache/caddy
448401
449402
- name: Start Caddy

.github/workflows/docs-preview.yaml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/publish.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ jobs:
2929
- name: Checkout code-server
3030
uses: actions/checkout@v3
3131

32+
- name: Install Node.js v16
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: "16"
36+
cache: "yarn"
37+
3238
- name: Download npm package from release artifacts
3339
uses: robinraju/[email protected]
3440
with:
@@ -141,7 +147,7 @@ jobs:
141147
VERSION: ${{ env.VERSION }}
142148
run: |
143149
git checkout -b update-version-${{ env.VERSION }}
144-
git add .
150+
git add .
145151
git commit -m "chore: updating version to ${{ env.VERSION }}"
146152
git push -u origin $(git branch --show)
147153
gh pr create --repo coder/code-server-aur --title "chore: bump version to ${{ env.VERSION }}" --body "PR opened by @$GITHUB_ACTOR" --assignee $GITHUB_ACTOR
@@ -186,7 +192,7 @@ jobs:
186192
out-file-path: "release-packages"
187193

188194
- name: Publish to Docker
189-
run: yarn publish:docker
195+
run: ./ci/steps/docker-buildx-push.sh
190196
env:
191197
VERSION: ${{ env.VERSION }}
192198
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/security.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
fetch-depth: 0
6666

6767
- name: Run Trivy vulnerability scanner in repo mode
68-
uses: aquasecurity/trivy-action@9ab158e8597f3b310480b9a69402b419bc03dbd5
68+
uses: aquasecurity/trivy-action@cff3e9a7f62c41dd51975266d0ae235709e39c41
6969
with:
7070
scan-type: "fs"
7171
scan-ref: "."

.github/workflows/trivy-docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
uses: actions/checkout@v3
5252

5353
- name: Run Trivy vulnerability scanner in image mode
54-
uses: aquasecurity/trivy-action@9ab158e8597f3b310480b9a69402b419bc03dbd5
54+
uses: aquasecurity/trivy-action@cff3e9a7f62c41dd51975266d0ae235709e39c41
5555
with:
5656
image-ref: "docker.io/codercom/code-server:latest"
5757
ignore-unfixed: true

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,31 @@ Code v99.99.999
2020
2121
-->
2222

23+
## [4.10.1](https://github.com/coder/code-server/releases/tag/v4.10.1) - 2023-03-04
24+
25+
Code v1.75.1
26+
27+
### Security
28+
29+
Added an origin check to web sockets to prevent cross-site hijacking attacks on
30+
users using older or niche browser that do not support SameSite cookies and
31+
attacks across sub-domains that share the same root domain.
32+
33+
The check requires the host header to be set so if you use a reverse proxy
34+
ensure it forwards that information otherwise web sockets will be blocked.
35+
36+
## [4.10.0](https://github.com/coder/code-server/releases/tag/v4.10.0) - 2023-02-15
37+
38+
Code v1.75.1
39+
40+
### Changed
41+
42+
- Updated to Code 1.75.1
43+
44+
### Removed
45+
46+
- Removed `--link` (was deprecated over thirteen months ago in 4.0.1).
47+
2348
## [4.9.1](https://github.com/coder/code-server/releases/tag/v4.9.1) - 2022-12-15
2449

2550
Code v1.73.1

ci/build/build-code-server.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,6 @@ main() {
1414
sed -i.bak "1s;^;#!/usr/bin/env node\n;" out/node/entry.js && rm out/node/entry.js.bak
1515
chmod +x out/node/entry.js
1616
fi
17-
18-
# for arch; we do not use OS from lib.sh and get our own.
19-
# lib.sh normalizes macos to darwin - but cloud-agent's binaries do not
20-
source ./ci/lib.sh
21-
OS="$(uname | tr '[:upper:]' '[:lower:]')"
22-
23-
mkdir -p ./lib
24-
25-
if ! [ -f ./lib/coder-cloud-agent ]; then
26-
echo "Downloading the cloud agent..."
27-
28-
set +e
29-
curl -fsSL "https://github.com/coder/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent
30-
chmod +x ./lib/coder-cloud-agent
31-
set -e
32-
fi
3317
}
3418

3519
main "$@"

ci/build/build-release.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ EOF
6363

6464
if [ "$KEEP_MODULES" = 1 ]; then
6565
rsync node_modules/ "$RELEASE_PATH/node_modules"
66-
mkdir -p "$RELEASE_PATH/lib"
67-
rsync ./lib/coder-cloud-agent "$RELEASE_PATH/lib"
6866
fi
6967
}
7068

0 commit comments

Comments
 (0)