Fixing issue #516 #1
Annotations
4 errors
|
copilot
Process completed with exit code 127.\n```\n\n## Solution\n\nModified the command execution to pass the command and arguments separately to prevent shell interpretation:\n\n1. **Added `parseArgs()` function** in `src/helpers.ts` that properly parses command line arguments while preserving quoted strings and handling shell metacharacters safely.\n\n2. **Updated command execution** in `src/main.ts` to use:\n ```typescript\n await exec.exec('helmfile', parseArgs(helmfileArgs), options)\n ```\n\n3. **Added comprehensive tests** covering:\n - Basic argument parsing\n - Quoted arguments with special characters\n - Shell injection prevention\n - Edge cases and backward compatibility\n\n## Verification\n\nThe fix safely handles the problematic case:\n```typescript\nparseArgs('diff --values \"description: Kind of the referent; More info: https://example.com\"')\n// Returns: ['diff', '--values', 'description: Kind of the referent; More info: https://example.com']\n```\n\nAll existing helmfile command patterns continue to work exactly as before, ensuring full backward compatibility.\n\nFixes #516."
|
|
copilot
Process completed with exit code 127.
|
|
copilot
Process completed with exit code 127.\n2025-06-19T19:59:06.0311278Z Post job cleanup.\n```\nrendered part:\n```\n kind:\n description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"'\n type: string\n x-kubernetes-validations:\n - message: kind may not be empty\n rule: self != ''\n name:\n description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'\n type: string\n x-kubernetes-validations:\n - message: name may not be empty\n rule: self != ''\n```\n\nit is weird that the previouse More dont generate a trouble.\n\nthis is my helmfile:\n```\nbases:\n - environments.yaml\n\nrepositories:\n - name: awskarpenter\n url: public.ecr.aws\n oci: true\n username: AWS\n password: {{ exec \"aws\" (list \"ecr-public\" \"get-login-password\" \"--region\" \"us-east-1\") }}\n\nreleases:\n - name: karpenter-crd\n namespace: kube-system\n version: {{ .StateValues.KARPENTER_CHART_VERSION }}\n chart: awskarpenter/karpenter/karpenter-crd\n```\n\n## Comments on the Issue (you are @copilot in this section)\n\n<comments>\n\n</comments>\n\n","depth":2,"owner":"helmfile","repo":"helmfile-action","numSnippets":10}
|
|
copilot
Process completed with exit code 127.
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
results
Expired
|
1.75 KB |
sha256:2fd5d088b78b575d6389b0e26feb6ba29bbb30a9cdaf1eebcc541299c8ecc1f6
|
|