elastic / elastic/docs-content

[Integration]: BeyondInsight Password Safe - “undeclared reference to 'sprintf'” compilation error in Elastic 8.18.3

Open
#3,415 3 comments 0 reactions 0 assignees View on GitHub
community source:web
Dominant language
No language data
Stars
47
Forks
261
Avg merge
3d 12h
Merged PRs (30d)
116

Description

### Type of issue

None

### What documentation page is affected

https://www.elastic.co/docs/reference/integrations/beyondinsight_password_safe

### What happened?

While configuring the **BeyondInsight Password Safe** integration in **Elastic Stack 8.18.3**, the input fails to initialize due to a compilation error in the integration’s internal script validation step.

The Elastic Agent shows the following error when validating the input:

Inputs

1 beyondinsight_password_safe-1

Needs attention

^ ERROR:
accessing config failed to check program: failed
failed to check program: failed compilation:
ERROR: :206:20: undeclared reference to 'sprintf' (in container ") |
sprintf("PS-Auth key=%s; runas=%s;", [state.apikey, state.username]) + |
:207:47: undeclared reference to 'sprintf' (in container ") |
((state.password != "") ? (sprintf(" pwd=[%s];", [state.password])) : ""), |
^ accessing config failed to check program: failed
compilation: ERROR: :92:20: undeclared reference to 'sprintf' (in container ") |
sprintf("PS-Auth key=%s; runas=%s;", [state.apikey, state.username]) + ...

The error occurs because the integration package internally uses the `sprintf()` function to build the **PS-Auth header string**, but this function is **not declared or supported in the script execution environment** used by Elastic integrations (the CEL expression engine).

As a result, the BeyondInsight Password Safe integration cannot start, and the input remains in the **“Needs attention”** state.

- Elastic Stack: 8.18.3
- Integration: beyondinsight_password_safe v0.12.0
- Elastic Agent mode: Fleet-managed
- Endpoint used: https://arquimedes.claro.com.co/BeyondTrust/api/public/v3
- BeyondTrust Password Safe version: 23.x
- Operating system: RHEL 8

Root cause

The integration’s script block attempts to dynamically build the authentication header using `sprintf`, as seen in the error trace:

sprintf("PS-Auth key=%s; runas=%s;", [state.apikey, state.username]) +
((state.password != "") ? (sprintf(" pwd=[%s];", [state.password])) : "")

### Additional info

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.