Repository navigation
fix(crewai): project business content without exporting framework credentials - #318
Merged
Merged
Conversation
Project business data without serializing runtime configuration; enforce structured credential redaction across CrewAI attributes, context and events. Honor directional privacy flags and preserve application outcomes while omitting automatic exception details. Disable native CrewAI telemetry across legacy and maintained versions without disabling traceAI spans. Declare setuptools<81 for clean floor installs, require core 1.2.2, and add installed-artifact privacy, native parity and actual OTLP JSON/protobuf gzip wire tests. Co-Authored-By: Claude Code <noreply@anthropic.com>
Recognize security, Vault, Consul, subject and service tokens plus API-secret headers without hiding token counters or IDs. Cover actual native ToolUsage input/output and log events over OTLP JSON/protobuf, plain/gzip, alongside hide-setting and structured-alias regressions. Co-Authored-By: Claude Code <noreply@anthropic.com>
Replace vendor-specific credential names with normalized credential markers and explicit safe metadata exceptions. Project pair and name/value headers, serialized JSON, and flattened paths without mutating application data. Exercise generated spellings and real ToolUsage exports in JSON/protobuf plain/gzip at the supported floor and current CrewAI. Co-Authored-By: Claude Code <noreply@anthropic.com>
…etadata Cover subscription, application and master key credentials; retain provider token counters and ordinary business lists. Apply complete header record projection in the CrewAI-local tracer before scalar core policy without changing global spans or lazy value semantics. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Separate framework configuration exclusion from the documented application field-name policy. Scope header interpretation to explicit header contexts, preserve business records and usage metadata, and validate native kickoff canaries on real OTLP wire. Remove manual changelog edits and refresh released core hashes. Co-Authored-By: Claude Code <noreply@anthropic.com>
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fi-instrumentation-otel==1.2.2for validation and replace the staged wheel/sdist hashes in the Poetry lock with the public artifacts. Merge origin/dev without rebasing or force-pushing.Acceptance contract
The following is also maintained in the package README. The P1 guarantee is structural exclusion of framework configuration, not a promise to detect every credential name/shape in arbitrary application payloads.
Privacy and credentials
Structural guarantee: framework configuration is not content
The instrumentor never exports an LLM, Agent, Crew, Task, Tool or client object
itself, and never calls its
repr,str,model_dump,dict,varsor genericJSON serializer to capture configuration. LLM API keys, base URLs (including
URLs with userinfo), configuration headers and credentials are not selected.
This does not depend on finding a secret's spelling or value.
The complete wrapper inventory is:
Task._execute_coreTaskOutput.json_dictwhen it is a plain dictionary, otherwiseTaskOutput.raw; plain application resultsCrew.kickoffinputs; named agent/task business metadata belowCrewOutput.json_dictwhen it is a plain dictionary, otherwiseCrewOutput.raw; prompt/completion/total usage countsToolUsage._useToolCalling.tool_name,ToolCalling.arguments; tool name only from the runtime toolCrew metadata selects only crew/task keys and UUIDs; agent role, goal, backstory,
key, UUID, verbosity, iteration/rate limits, delegation flag and tool names;
and task description, expected output, UUID, execution/human-input flags,
assigned agent role/key, context task descriptions and tool names. Task description
and expected output are also emitted as formatted aliases when
share_crew=True.Agent.execute_taskand LLM calls have no additional wrappers in this package:they execute inside the task span and their arguments/results are not serialized
independently. Separately installed LLM instrumentors have their own policies.
Opaque runtime objects nested in application data are replaced with
[omitted runtime object], without inspecting their attributes. The guarantee isabout framework configuration objects, not credentials deliberately copied into
application prose or a plain dictionary. Instrumentation preserves application
arguments, results and raised exceptions.
Application content: a field-name policy, not a universal secret detector
With content capture on, task/tool inputs and outputs are application content.
The following policy applies to plain dictionaries, lists and tuples (copied
without mutation), and complete JSON object/array strings. It also applies to
context and span/event attributes, including structured
log.bodyattributes.It does not filter independent application logging pipelines or console output.
Names are case-insensitive; an initial
X-/X_prefix and punctuation/separatorsare normalized away. Dot/bracket field paths are inspected component by
component, including nested dictionary paths. A field and all its descendants
are replaced by
__REDACTED__if the normalized component contains any of thesemarkers:
apikey,accesskey,privatekey,clientkey,signingkey,subscriptionkey,applicationkey,masterkey;token,secret,password,passwd,passphrase,credential,auth,cookie,session,signature,bearer,jwt,otp.pinmatches a whole normalized component only. Adjacent components are alsocombined for the eight
*keymarkers above, soclient.api.keyandclient[private][key]match their single-field equivalents.Header interpretation requires an explicit field whose normalized name ends in
headers(for exampleheaders,request_headers,rawHeaders):rawHeaders;name,keyorheaderselector and avaluefield;0/1selectors,including descendants of list-valued
valuefields in one attribute batch.A credential-named header selector preserves its name but redacts the entire
paired value. Outside a named headers field, pairs and
{name, value}recordsare ordinary business data, never inferred to be headers. For example,
topics=['authentication', 'billing'], business tables and product records keeptheir values.
The exact normalized metadata exceptions below remain visible (children are
still inspected). These cover standard token counters, generation limits,
tokenizer metadata, author metadata and non-secret session/service metadata:
acceptedpredictiontokens,apisecretid,audiotokens,author,authoremail;authorid,authority,authorname,authors,authorship;authorurl,cachecreationinputtokens,cachedcontenttokencount,cachedinputtokens,cachedtokencount;cachedtokens,cachereadinputtokens,cachereadtokens,cachewriteinputtokens,cachewritetokens;candidatestokencount,completiontokencount,completiontokens,completiontokensdetails,consultokenttl;inputtokencount,inputtokens,inputtokensdetails,maxcompletiontokens,maxinputtokens;maxnewtokens,maxoutputtokens,maxtokens,numtokens,outputtokencount;outputtokens,outputtokensdetails,promptcachehittokens,promptcachemisstokens,prompttokencount;prompttokens,prompttokensdetails,reasoningtokencount,reasoningtokens,rejectedpredictiontokens;securitytokenid,servicetokencount,sessioncount,sessionduration,sessiondurationms;subjecttokentype,thoughtstokencount,tokencount,tokenid,tokenizer;tokenizername,tokenizerversion,tokensused,tokenusage,tooluseprompttokencount;totaltokencount,totaltokens,vaulttokencount.These are field-name rules, not value inspection. Unknown credential names
(for example an application-specific
pwd,sigor vendor key header notmatching the markers), novel shapes, arbitrary free text and encodings other
than complete JSON objects/arrays are outside this policy. Do not put credentials
in content fields or metadata. Dictionaries beyond depth 20 are omitted, as are
structured strings larger than 1,000,000 characters or unparseable structured
strings; opaque objects are not dumped as a fallback.
To disable content capture, set
FI_HIDE_INPUTS=trueandFI_HIDE_OUTPUTS=truebefore instrumentation, or pass
TraceConfig(hide_inputs=True, hide_outputs=True).Directional text/message hiding also covers CrewAI's content aliases. Wrapper
failures record ERROR status without copying exception messages or stacktraces.
For manually recorded error events, use
FI_HIDE_ERROR_DETAILS=true.CrewAI's separate native telemetry
CrewAI can export through its own provider to
telemetry.crewai.com, independentlyof traceAI. This instrumentor does not change environment variables, patch
CrewAI's telemetry classes, disable its provider or restore/change your settings
on
uninstrument(). Choose the native telemetry policy explicitly beforeimporting CrewAI.
In CrewAI 0.152.0 and 1.15.33,
CREWAI_DISABLE_TELEMETRY=trueorCREWAI_DISABLE_TRACKING=truedisables native telemetry while leaving traceAIavailable.
OTEL_SDK_DISABLED=trueis also honored, but disables the OTel SDKand traceAI spans too; do not use it when you want traceAI tracing.
CREWAI_TELEMETRY_OPT_OUTandDO_NOT_TRACKare not native disable flags.CrewAI 0.41.1 has no native telemetry opt-out flag: its constructor creates an
exporter for
https://telemetry.crewai.com:4319/v1/tracesand ignores the flagsabove. If you need native telemetry disabled, upgrade to a version that honors
CREWAI_DISABLE_TELEMETRYbefore running sensitive workloads. For legacyworkloads, enforce a network egress policy; traceAI's projections cannot protect
an independent provider's exports.
share_crew=Falseis not a native telemetrydisable switch.
Validation on this revision
Fresh dependency environments installed the released core from PyPI, not staged/local core wheels. The final package distributions were then installed for these runs:
1,263 final-matrix test passes, zero failures. The Poetry-locked environment was installed through
poetry installwith re-resolution disabled, exercising the published artifact hashes. Final local wheel/sdist replacement used the already dependency-resolved environments; these are not claims of three entirely new dependency resolutions from the package archives.Release boundary
No version bump or CHANGELOG edit remains relative to dev. This PR does not merge, publish, tag or release anything. Release-please owns release notes/versioning after the conventional fix commit is merged. Independent application exporters, console logging, historical-exposure assessment and credential rotation remain outside this instrumentor's guarantee.
🤖 Generated with Claude Code