Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/ut/commands/model_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('Model', () => {
});

expect(() => new Model(mockInputs)).toThrow(
'Command "invalid" not found, Please use "s cli fc3 layer -h" to query how to use the command',
'Command "invalid" not found, Please use "s cli fc3 model -h" to query how to use the command',
);
});
});
Expand Down
124 changes: 124 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
"temp-dir": "^2.0.0",
"tty-table": "^4.2.3",
"uuid": "^9.0.1",
"undici": "^5.28.5",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

What is the latest version of undici npm package and are there any known security vulnerabilities in version 5.28.5?

💡 Result:

Latest version (as of 2026-05-19): undici 8.3.0 is the latest published version on npm [1]. Known security vulnerabilities in undici 5.28.5: Snyk’s vulnerability advisory indicates multiple issues affecting undici versions earlier than 5.28.5 (e.g., Insecure Randomness via Math.random boundary selection, and others) and states that they are fixed by upgrading to 5.28.5 (or higher) [2]. Additionally, the undici project’s own “Security Release” notes for v5.28.3 mention a CVE-2024-24758 related to Proxy-Authorization header not cleared on cross-origin redirect, which would be relevant to that older patch line [3]. For undici specifically at 5.28.5, Snyk does not show a dedicated page in the retrieved sources that lists “direct vulnerabilities” for exactly 5.28.5; however, the above Snyk findings clearly indicate that the high-level issues disclosed for nearby 5.28.x versions are addressed by upgrading to 5.28.5 [2]. If you need an exhaustive CVE list that explicitly enumerates every issue affecting exactly 5.28.5, I can run one more targeted search focused on “undici@5.28.5 vulnerabilities / CVEs” in a subsequent step.

Citations:


Update undici to a current version.

The undici dependency is pinned to version ^5.28.5, but the latest version is 8.3.0. This is 3 major versions behind. While 5.28.5 itself has no known vulnerabilities, the significant version gap means missing important security patches, bug fixes, and improvements. Update to version 8.x or the latest available.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 57, Update the "undici" dependency entry in
package.json from the pinned ^5.28.5 to a current 8.x version (e.g., ^8.3.0 or
the latest), then run your package manager to refresh lockfiles (npm install /
npm update or yarn install) and run the test suite to ensure no breaking
changes; target the "undici" dependency line in package.json to make this change
and verify any code that imports undici remains compatible with the newer major
version.

"@serverless-devs/docker-image-builder": "^0.0.0-20260518-164317-160dd89efac1",
"uuid-by-string": "^4.0.0"
},
"devDependencies": {
Expand All @@ -76,6 +78,9 @@
"resolutions": {
"@alicloud/sls20191023": {
"registry": "https://packages.aliyun.com/670e108663cd360abfe4be65/npm/npm-registry/"
},
"@serverless-devs/docker-image-builder": {
"registry": "https://packages.aliyun.com/670e108663cd360abfe4be65/npm/npm-registry/"
}
}
}
2 changes: 1 addition & 1 deletion publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Type: Component
Name: fc3
Provider:
- 阿里云
Version: 0.1.20
Version: 0.1.21
Description: 阿里云函数计算全生命周期管理
HomePage: https://github.com/devsapp/fc3
Organization: 阿里云函数计算(FC)
Expand Down
12 changes: 11 additions & 1 deletion src/commands-help/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Examples:
$ s build --dockerfile ./code/Dockerfile --context ./code
$ s build --custom-env "{\\"myenv\\": \\"test\\"}" --custom-args="-i https://pypi.tuna.tsinghua.edu.cn/simple"
$ s build --command="pip install -t . flask -i https://pypi.tuna.tsinghua.edu.cn/simple"
$ s build --script-file my_script.sh`,
$ s build --script-file my_script.sh
$ s build --cloud-build-config fc3-cloud-build.yaml
$ s build --cloud-build-config fc3-cloud-build.yaml --debug-instance`,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
summary: 'Build the dependencies',
option: [
['--publish-layer', '[Optional] Publishing the built artifact as a layer'],
Expand All @@ -20,6 +22,14 @@ Examples:
],
['--command <string>', '[Optional] Using custom commands'],
['--script-file <scriptFile>', '[Optional] Using custom shell scripts'],
[
'--cloud-build-config <buildYaml>',
'[Optional] Cloud based build configuration file, default to search for the current directory fc3-cloud-build.yaml.',
],
[
'--debug-instance',
'[Optional] Only for cloud building, start the interactive debugging window after the build is complete.',
],
[
'-f, --dockerfile <string>',
'[Optional] Specify the dockerfile path, Use docker to build the image of the custom container runtime',
Expand Down
2 changes: 2 additions & 0 deletions src/commands-help/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import logs from './logs';
import session from './session';
import scaling from './scaling';
import list from './list';
import model from './model';

export default {
deploy,
Expand All @@ -38,4 +39,5 @@ export default {
session,
scaling,
list,
model,
};
6 changes: 3 additions & 3 deletions src/commands-help/model.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export default {
help: {
description: 'Resource layer operation ',
summary: 'Resource layer operation ',
description: 'Resource model operation ',
summary: 'Resource model operation ',
},
subCommands: {
download: {
help: {
description: `Download model`,
summary: 'Publish new layer version',
summary: 'Download model',
option: [],
},
},
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ export default class Fc extends Base {

public async build(inputs: IInputs) {
await super.handlePreRun(inputs, false);
const build = new BuilderFactory(inputs);
if (build.findCloudBuildYaml()) {
return await build.runit();
}

const runtime = _.get(inputs, 'props.runtime');
if (FC.isCustomContainerRuntime(runtime)) {
Expand Down
1 change: 1 addition & 0 deletions src/interface/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface IProps extends IFunction {
endpoint?: string;
supplement?: any;
annotations?: any;
buildDir?: string;
}

export interface IInputs extends _IInputs {
Expand Down
Loading
Loading