bytedance / bytedance/agentkit-samples

CDN scripts can select an ARM-only CLI on Intel macOS

Open
#261 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
454
Forks
96
PR merge metrics
No merged PRs in 30d

Description

### Description

Several CDN skill scripts unconditionally prefer the checked-in `bin/ve` executable whenever it exists, but that file is specifically the macOS arm64 build. The same skill explicitly documents and otherwise implements support for both Apple Silicon and Intel (`x86_64`) macOS.

Affected selectors include:

- `scripts/submit-refresh.sh`
- `scripts/submit-preload.sh`
- `scripts/cdn-refresh-preload.sh`
- `scripts/add-domain-quick.sh`
- the initial local-CLI path in `scripts/add-cdn-domain.sh`

### Static reproduction

At commit `0890278a6571e4190c1ab8cacd9becc147f74d9c`:

- `skills/byted-volc-cdn-manage/bin/ve` is 10,598,098 bytes.
- Its Mach-O header is `CF FA ED FE 0C 00 00 01`, identifying a 64-bit ARM Mach-O executable.
- SHA-256 is `FE0F045BDC6AD1D93BD73519EC16A05F84B397B58B1AB94607469E8EC409CC62`, matching the official Volcengine CLI v1.0.39 Darwin arm64 asset inspected during the audit.
- `references/install-guide.md` lines 21-37 and 94-105 document separate arm64 and x86_64 downloads.
- For example, `submit-refresh.sh` selects the bundled file based only on existence/executable status and does not compare `uname -m` before executing it.

### Expected behavior

Scripts should execute a CLI binary compatible with the current operating system and architecture, or fall back to a compatible installed/downloaded CLI with a clear diagnostic.

### Impact

On an Intel Mac, the scripts can select an ARM-only executable even though the skill advertises x86_64 support, causing the documented refresh/preload flows to fail before making a CDN request.

### Duplicate check

Open/closed issues, all PR states, relevant script history, default-branch commits, and architecture/root-cause terms were searched. No equivalent report or fix was found.

### Why there is no PR in this audit

The audit host is Windows and has no usable Bash/WSL environment or macOS x86_64 runtime. A complete change also requires a maintainer decision between removing the large bundled binary, checking architecture and preferring PATH, or checking in multiple verified artifacts. Without the supported macOS environments, the packaging/fallback behavior could not be validated sufficiently for a PR.

Contributor guide

Open the contributing guide

Research direction

Read references/install-guide.md lines 21-37 and 94-105, then inspect the selectors in scripts/submit-refresh.sh, scripts/submit-preload.sh, scripts/cdn-refresh-preload.sh, scripts/add-domain-quick.sh, and scripts/add-cdn-domain.sh. Confirm how each path chooses bin/ve versus an installed or downloaded CLI. Done means Intel and Apple Silicon macOS select compatible executables or emit a clear diagnostic, with the maintainer's packaging decision resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli, cloud
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.