Skip to content

Commit

Permalink
Merge pull request #1512 from snyk/fix/k8s-object-requirements
Browse files Browse the repository at this point in the history
fix: remove spec requirement
  • Loading branch information
p0tr3c committed Nov 5, 2020
2 parents 50ec62d + bb7efaf commit 8b14d00
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/iac/iac-parser.ts
Expand Up @@ -12,7 +12,7 @@ import {

const debug = debugLib('snyk-detect');

const requiredK8SObjectFields = ['apiVersion', 'kind', 'metadata', 'spec'];
const requiredK8SObjectFields = ['apiVersion', 'kind', 'metadata'];

export function getFileType(filePath: string): string {
const filePathSplit = filePath.split('.');
Expand Down
2 changes: 0 additions & 2 deletions test/fixtures/iac/kubernetes/pod-invalid.yaml
@@ -1,4 +1,2 @@
apiVersion: test
kind: example
metadata:
name: pod

0 comments on commit 8b14d00

Please sign in to comment.