Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check downloaded resources integrity #14

Open
alexec opened this issue Jun 11, 2022 · 0 comments
Open

Check downloaded resources integrity #14

alexec opened this issue Jun 11, 2022 · 0 comments
Labels
bug Something isn't working security

Comments

@alexec
Copy link

alexec commented Jun 11, 2022

When you pull a resource down, you should check the resources hash against a known good value, in case the third-party is compromised and an attacker replaces the resource (Javascript) with something bad.

Basically this:

https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity

<script src="https://example.com/example-framework.js"
        integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
        crossorigin="anonymous"></script>

Could be done like this:

apiVersion: argoproj.io/v1alpha1
kind: ArgoCDExtension
metadata:
  name: hello-world
  finalizers:
    - extensions-finalizer.argocd.argoproj.io
spec:
  sources:
    - git:
        url: https://github.com/argoproj-labs/argocd-example-extension.git
    - web:
        url: https://github.com/argoproj-labs/argocd-example-extension/releases/download/v0.1.0/extension.tar
        integrity: sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC
@alexec alexec added bug Something isn't working security labels Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working security
Projects
None yet
Development

No branches or pull requests

1 participant