Skip to content

Feature icp canister adapter#32

Open
HiveForensicsAI wants to merge 8 commits intomainfrom
feature-icp-canister-adapter
Open

Feature icp canister adapter#32
HiveForensicsAI wants to merge 8 commits intomainfrom
feature-icp-canister-adapter

Conversation

@HiveForensicsAI
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff757b269c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +65 to +66
#[update]
fn set_pack(bytes: Vec<u8>, label: String) -> HealthDto {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restrict pack mutation APIs to authorized callers

Add an explicit caller check before allowing set_pack/clear_pack to mutate state. As implemented, any principal that can reach the canister can overwrite or erase the knowledge pack, which means a public deployment can be trivially defaced or made unavailable by anonymous callers. This is a production-impacting security issue because the write methods are exposed as unrestricted #[update] entrypoints.

Useful? React with 👍 / 👎.

Comment on lines +353 to +357
const output = execFileSync(dfxBin, args, {
cwd,
encoding: 'utf8',
env,
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Raise dfx subprocess buffer for large query results

runDfx uses execFileSync with the default maxBuffer, so knolo icp query can fail once JSON output grows beyond that limit (for example, larger block texts with top_k up to 50). In that case the canister call itself may succeed but the CLI throws due to buffered stdout size, which makes the command unreliable on realistic packs. Set a larger maxBuffer or stream output instead of buffering it all.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants