set-header name="Content-Type" value should not be redacted by extractor
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 71/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- azure, node.js, typescript
调研方向
首先找到用于遮蔽 API 策略中 set-header 元素值的提取器逻辑,然后检查它如何处理标头名称,以及现有的值遮蔽测试。使用提供的 Content-Type 示例添加或更新测试;当提取结果保留 application/x-www-form-urlencoded,同时机密值仍被遮蔽时,即为完成。
由索引模型根据 Issue 内容生成。
描述
Command that triggered the bug
apiops extract
Expected behavior
When extracting an API the value in the a set-header name="Content-Type" should not be redacted as this is a standard header and holds no secret information that needs redacting.
Actual behavior
When extracting an API the extractor replaces the value in set-header name="Content-Type" with "*** REDACTED ***".
Original policy:
<send-request mode="new" response-variable-name="tokenResponseVar" timeout="20" ignore-error="false">
<set-url>{{base-url}}/authenticate</set-url>
<set-method>POST</set-method>
<set-header name="Content-Type" exists-action="override">
<value>application/x-www-form-urlencoded</value>
</set-header>
<set-body>@{
return $"apikey={{api-password}}";
}</set-body>
</send-request>
Extracted policy:
<send-request mode="new" response-variable-name="tokenResponseVar" timeout="20" ignore-error="false">
<set-url>{{base-url}}/authenticate</set-url>
<set-method>POST</set-method>
<set-header name="Content-Type" exists-action="override">
<value>*** REDACTED ***</value>
</set-header>
<set-body>@{
return $"apikey={{api-password}}";
}</set-body>
</send-request>
apiops CLI version
1.0.5
Environment details
node 22.21.1 x64
CI/CD environment
Azure DevOps
Is this bug blocking you?
Yes
- 主要语言
- TypeScript
- 星标
- 44
- 派生
- 14
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/apiops-cli 的其他 Issue
-
stale
难度 1/5 1-3 小时 新手友好度 84/100
Azure/apiops-cli#333 · 1 条评论 ·
-
extract fails when a policy uses set-backend-service backend-id="{{namedValue}}"可能已有人在做 @dannyward630 于 36 天前认领。 未关闭stale type:bug
难度 2/5 1-3 小时 新手友好度 78/100
Azure/apiops-cli#331 · 1 条评论 ·
-
Docs example says products are auto-included transitively, but they aren't extracted with `products: []`可能已有人在做 @cdayne 于 27 天前认领。 未关闭stale type:question
难度 2/5 1-3 小时 新手友好度 76/100
Azure/apiops-cli#277 · 1 条评论 ·
-
Extractor mistakes set-body json response as transitive dependency which causes pipeline failure未关闭type:bug
难度 3/5 1-2 天 新手友好度 56/100
Azure/apiops-cli#349 ·
-
难度 5/5 一周以上 新手友好度 35/100
Azure/apiops-cli#345 ·
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
nicobailon/pi-subagents#3425 ·
维护者通常 1 天内回复
-
area-a2a bug port python
难度 2/5 1-3 小时 新手友好度 68/100
strands-agents/harness-sdk#6697 · 1 条评论 ·
维护者通常 1 天内回复
-
api technical-debt
难度 2/5 1-3 小时 新手友好度 66/100
opencollective/opencollective#9235 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
openwatersio/slackwater#603 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复