Skip to content

Commit a9fb355

Browse files
committed
Merge remote-tracking branch 'upstream/alpha' into alpha
2 parents 6a40dc4 + 6323368 commit a9fb355

Some content is hidden

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

48 files changed

+1281
-740
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
### Issue Description
1212
<!-- Add a brief description of the issue this PR solves. -->
1313

14-
Related issue: FILL_THIS_OUT
14+
Closes: FILL_THIS_OUT
1515

1616
### Approach
1717
<!-- Add a description of the approach in this PR. -->
@@ -26,4 +26,3 @@ Related issue: FILL_THIS_OUT
2626
- [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
2727
- [ ] Add [security check](https://github.com/parse-community/parse-server/blob/master/CONTRIBUTING.md#security-checks)
2828
- [ ] Add new Parse Error codes to Parse JS SDK <!-- no hard-coded error codes in Parse Server -->
29-
- [x] A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,27 @@ jobs:
7070
- name: Install dependencies
7171
run: npm ci
7272
- run: npm run lint
73+
check-definitions:
74+
name: Check Definitions
75+
timeout-minutes: 5
76+
runs-on: ubuntu-18.04
77+
steps:
78+
- uses: actions/checkout@v2
79+
- name: Use Node.js ${{ matrix.NODE_VERSION }}
80+
uses: actions/setup-node@v2
81+
with:
82+
node-version: ${{ matrix.node-version }}
83+
- name: Cache Node.js modules
84+
uses: actions/cache@v2
85+
with:
86+
path: ~/.npm
87+
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
88+
restore-keys: |
89+
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
90+
- name: Install dependencies
91+
run: npm ci
92+
- name: CI Definitions Check
93+
run: npm run ci:definitionsCheck
7394
check-circular:
7495
name: Circular Dependencies
7596
timeout-minutes: 5

.github/workflows/release-automated.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: release-automated
22
on:
33
push:
4-
branches: [ release, alpha, beta, next-major ]
4+
branches: [ release, alpha, beta, next-major, 'release-[0-9]+.x.x' ]
55
jobs:
66
release:
77
runs-on: ubuntu-latest

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
- [Merging](#merging)
3333
- [Breaking Change](#breaking-change-1)
3434
- [Reverting](#reverting)
35+
- [Security Vulnerability](#security-vulnerability)
3536
- [Releasing](#releasing)
3637
- [General Considerations](#general-considerations)
3738
- [Major Release / Long-Term-Support](#major-release--long-term-support)
@@ -451,6 +452,24 @@ If the commit reverts a previous commit, use the prefix `revert:`, followed by t
451452
This reverts commit 1234567890abcdef.
452453
```
453454
455+
### Security Vulnerability
456+
457+
#### Local Testing
458+
459+
Fixes for securify vulnerabilities are developed in private forks with a closed audience, inaccessible to the public. A current GitHub limitation does not allow to run CI tests on pull requests in private forks. Whether a pull requests fully passes all CI tests can only be determined by publishing the fix as a public pull request and running the CI. This means the fix and implicitly information about the vulnerabilty are made accessible to the public. This increases the risk that a vulnerability fix is published, but then cannot be merged immediately due to a CI issue. To mitigate that risk, before publishing a vulnerability fix, the following tests needs to be run locally and pass:
460+
461+
- `npm run test` (MongoDB)
462+
- `npm run test` (Postgres)
463+
- `npm run madge:circular` (circular dependencies)
464+
- `npm run lint` (Lint)
465+
- `npm run definitions` (Parse Server options definitions)
466+
467+
#### Merging
468+
469+
A current GitHub limitation does not allow to customize the commit message when merging pull requests of a private fork that was created to fix a security vulnerabilty. Our release automation framework demands a specific commit message syntax which therefore cannot be met. This prohibits to follow the process that GitHub suggest, which is to merge a pull request from a private fork directly to a public branch. Instead, after [local testing](#local-testing), a public pull request needs to be created with the code fix copied over from the private pull request.
470+
471+
This creates a risk that a vulnerability is indirectly disclosed by publishing a pull request with the fix, but the fix cannot be merged due to a CI issue. To mitigate that risk, the pull request title and description should be kept marginal or generic, not hiting to a vulnerabilty or giving any details about the vulnerabilty, until the pull request has been successfully merged.
472+
454473
## Releasing
455474
456475
### General Considerations

DEPRECATIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The following is a list of deprecations, according to the [Deprecation Policy](h
66
|--------|-------------------------------------------------|----------------------------------------------------------------------|---------------------------------|---------------------------------|-----------------------|-------|
77
| DEPPS1 | Native MongoDB syntax in aggregation pipeline | [#7338](https://github.com/parse-community/parse-server/issues/7338) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - |
88
| DEPPS2 | Config option `directAccess` defaults to `true` | [#6636](https://github.com/parse-community/parse-server/pull/6636) | 5.0.0 (2022) | 6.0.0 (2023) | removed | - |
9-
| DEPPS3 | Config option `enforcePrivateUsers` defaults to `true` | [#7319](https://github.com/parse-community/parse-server/pull/7319) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - |
9+
| DEPPS3 | Config option `enforcePrivateUsers` defaults to `true` | [#7319](https://github.com/parse-community/parse-server/pull/7319) | 5.0.0 (2022) | 6.0.0 (2023) | removed | - |
1010
| DEPPS4 | Remove convenience method for http request `Parse.Cloud.httpRequest` | [#7589](https://github.com/parse-community/parse-server/pull/7589) | 5.0.0 (2022) | 6.0.0 (2023) | removed | - |
1111
| DEPPS5 | Config option `allowClientClassCreation` defaults to `false` | [#7925](https://github.com/parse-community/parse-server/pull/7925) | 5.3.0 (2022) | 7.0.0 (2024) | deprecated | - |
1212
| DEPPS6 | Auth providers disabled by default | [#7953](https://github.com/parse-community/parse-server/pull/7953) | 5.3.0 (2022) | 7.0.0 (2024) | deprecated | - |

changelogs/CHANGELOG_alpha.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
1+
# [6.0.0-alpha.14](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.13...6.0.0-alpha.14) (2022-12-16)
2+
3+
4+
### Features
5+
6+
* Write log entry when request with master key is rejected as outside of `masterKeyIps` ([#8350](https://github.com/parse-community/parse-server/issues/8350)) ([e22b73d](https://github.com/parse-community/parse-server/commit/e22b73d4b700c8ff745aa81726c6680082294b45))
7+
8+
# [6.0.0-alpha.13](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.12...6.0.0-alpha.13) (2022-12-07)
9+
10+
11+
### Features
12+
13+
* Add option to change the log level of the logs emitted by triggers ([#8328](https://github.com/parse-community/parse-server/issues/8328)) ([8f3b694](https://github.com/parse-community/parse-server/commit/8f3b694e39d4a966567e50dbea4d62e954fa5c06))
14+
15+
# [6.0.0-alpha.12](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.11...6.0.0-alpha.12) (2022-11-26)
16+
17+
18+
### Features
19+
20+
* Upgrade Redis 3 to 4 for LiveQuery ([#8333](https://github.com/parse-community/parse-server/issues/8333)) ([b2761fb](https://github.com/parse-community/parse-server/commit/b2761fb3786b519d9bbcf35be54309d2d35da1a9))
21+
22+
# [6.0.0-alpha.11](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.10...6.0.0-alpha.11) (2022-11-25)
23+
24+
25+
### Bug Fixes
26+
27+
* Parse Server option `masterKeyIps` does not include localhost by default for IPv6 ([#8322](https://github.com/parse-community/parse-server/issues/8322)) ([ab82635](https://github.com/parse-community/parse-server/commit/ab82635b0d4cf323a07ddee51fee587b43dce95c))
28+
29+
# [6.0.0-alpha.10](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.9...6.0.0-alpha.10) (2022-11-19)
30+
31+
32+
### Bug Fixes
33+
34+
* Cloud Code trigger `beforeSave` does not work with `Parse.Role` ([#8320](https://github.com/parse-community/parse-server/issues/8320)) ([f29d972](https://github.com/parse-community/parse-server/commit/f29d9720e9b37918fd885c97a31e34c42750e724))
35+
36+
# [6.0.0-alpha.9](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.8...6.0.0-alpha.9) (2022-11-16)
37+
38+
39+
### Features
40+
41+
* Remove deprecation `DEPPS3`: Config option `enforcePrivateUsers` defaults to `true` ([#8283](https://github.com/parse-community/parse-server/issues/8283)) ([ed499e3](https://github.com/parse-community/parse-server/commit/ed499e32a21bab9a874a9e5367dc71248ce836c4))
42+
43+
44+
### BREAKING CHANGES
45+
46+
* The Parse Server option `enforcePrivateUsers` is set to `true` by default; in previous releases this option defaults to `false`; this change improves the default security configuration of Parse Server (#8283) ([ed499e3](ed499e3))
47+
48+
# [6.0.0-alpha.8](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.7...6.0.0-alpha.8) (2022-11-11)
49+
50+
51+
### Features
52+
53+
* Restrict use of `masterKey` to localhost by default ([#8281](https://github.com/parse-community/parse-server/issues/8281)) ([6c16021](https://github.com/parse-community/parse-server/commit/6c16021a1f03a70a6d9e68cb64df362d07f3b693))
54+
55+
56+
### BREAKING CHANGES
57+
58+
* This release restricts the use of `masterKey` to localhost by default; if you are using Parse Dashboard on a different server to connect to Parse Server you need to add the IP address of the server that hosts Parse Dashboard to this option (#8281) ([6c16021](6c16021))
59+
60+
# [6.0.0-alpha.7](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.6...6.0.0-alpha.7) (2022-11-11)
61+
62+
63+
### Features
64+
65+
* Upgrade Redis 3 to 4 ([#8293](https://github.com/parse-community/parse-server/issues/8293)) ([7d622f0](https://github.com/parse-community/parse-server/commit/7d622f06a4347e0ad2cba9a4ec07d8d4fb0f67bc))
66+
67+
68+
### BREAKING CHANGES
69+
70+
* This release upgrades to Redis 4; if you are using the Redis cache adapter with Parse Server then this is a breaking change as the Redis client options have changed; see the [Redis migration guide](https://github.com/redis/node-redis/blob/redis%404.0.0/docs/v3-to-v4.md) for more details (#8293) ([7d622f0](7d622f0))
71+
172
# [6.0.0-alpha.6](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.5...6.0.0-alpha.6) (2022-11-10)
273

374

ci/definitionsCheck.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
const fs = require('fs').promises;
2+
const { exec } = require('child_process');
3+
const core = require('@actions/core');
4+
const { nextTick } = require('process');
5+
const { AbortController } = require("node-abort-controller");
6+
(async () => {
7+
const [currentDefinitions, currentDocs] = await Promise.all([
8+
fs.readFile('./src/Options/Definitions.js', 'utf8'),
9+
fs.readFile('./src/Options/docs.js', 'utf8'),
10+
]);
11+
exec('npm run definitions');
12+
const ac = new AbortController();
13+
const { signal } = ac;
14+
const watcher = fs.watch('./src/Options/docs.js', {signal});
15+
let i = 0;
16+
// eslint-disable-next-line
17+
for await (const _ of watcher) {
18+
i++;
19+
if (i === 3) {
20+
ac.abort();
21+
break;
22+
}
23+
}
24+
await new Promise(resolve => nextTick(resolve));
25+
const [newDefinitions, newDocs] = await Promise.all([
26+
fs.readFile('./src/Options/Definitions.js', 'utf8'),
27+
fs.readFile('./src/Options/docs.js', 'utf8'),
28+
]);
29+
if (currentDefinitions !== newDefinitions || currentDocs !== newDocs) {
30+
console.error(
31+
'\x1b[31m%s\x1b[0m',
32+
'Definitions files cannot be updated manually. Please update src/Options/index.js then run `npm run definitions` to generate definitions.'
33+
);
34+
core.error('Definitions files cannot be updated manually. Please update src/Options/index.js then run `npm run definitions` to generate definitions.');
35+
process.exit(1);
36+
} else {
37+
process.exit(0);
38+
}
39+
})();

0 commit comments

Comments
 (0)