Skip to content

fix(internal/secrets): Error on Missing Secrets#260

Merged
jshlbrd merged 2 commits intomainfrom
jshlbrd/fix/missing-secret
Oct 10, 2024
Merged

fix(internal/secrets): Error on Missing Secrets#260
jshlbrd merged 2 commits intomainfrom
jshlbrd/fix/missing-secret

Conversation

@jshlbrd
Copy link
Contributor

@jshlbrd jshlbrd commented Oct 10, 2024

Description

  • Fixes a missing error in case no secret is found

Motivation and Context

Discovered this after running substation vet -R examples/:

% substation vet examples/transform/enrich/urlscan/config.jsonnet
panic: interface conversion: interface {} is nil, not string

This is the new output:

% substation vet examples/transform/enrich/urlscan/config.jsonnet
examples/transform/enrich/urlscan/config.jsonnet:2 transform bb7942d9-810481d2: secrets: no secret found

    {"type":"enrich_http_post","settings":{"headers":{"API-Key":"${SECRET:URLSCAN}","Content-Type":"application/json"},"id":"bb7942d9-810481d2","object":{"body_key":"@this","target_key":"meta response"},"request":{"timeout":"1s"},"url":"https://urlscan.io/api/v1/scan/"}}

How Has This Been Tested?

Using substation vet (v2.1.0).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@jshlbrd jshlbrd marked this pull request as ready for review October 10, 2024 13:42
@jshlbrd jshlbrd requested a review from a team as a code owner October 10, 2024 13:42
@jshlbrd jshlbrd merged commit b788992 into main Oct 10, 2024
@jshlbrd jshlbrd deleted the jshlbrd/fix/missing-secret branch October 10, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants