
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
github.com/zdz1715/yaml-parser
处理yaml
、yml
文件的自定义注解解析
$ yaml-parser --help
Handles custom annotation parsing of YAML files
Usage:
yaml-parser [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
param Extract parameters from a single yaml file
split Dividing a YAML file into multiple
Flags:
-h, --help help for yaml-parser
Use "yaml-parser [command] --help" for more information about a command.
# +parser:tag=value
适用于split
# +parser:param:key1=value1,key2=value2
适用于param
deploy-helm.yaml
(例子)
# +parser:tag=stage
# +parser:param:namespace=default,release_name=app-1
name: deploy-helm-stage
tag:
- 111
- 222
---
# +parser:param:namespace=default-1,release_name=app-2
name: deploy-helm-1
tag:
- 333
- 444
split
兼容yaml文件的分隔符
---
$ yaml-parser split deploy-helm.yaml
[deploy-helm.yaml] deploy-helm_stage.yaml deploy-helm_1.yaml
deploy-helm_stage.yaml
# +parser:tag=stage
# +parser:param:namespace=default,release_name=app-1
name: deploy-helm-stage
tag:
- 111
- 222
deploy-helm_1.yaml
# +parser:param:namespace=default-1,release_name=app-2
name: deploy-helm-1
tag:
- 333
- 444
param
# 获取所有参数
$ yaml-parser param deploy-helm.yaml
[{"key":"namespace","value":"default"},{"key":"release_name","value":"app-1"},{"key":"namespace","value":"default-1"},{"key":"release_name","value":"app-2"}]
# 获取特定key的参数,相同key后面值会覆盖前面
$ yaml-parser param deploy-helm.yaml --key release_name
app-2
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.