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

web: Fix missing integrity fields in package-lock.json #11509

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

jvanbruegge
Copy link
Contributor

Details

Same issue as with #9419

There was a CI check for this, however #10157 removed the CI check, which made this issue possible again. lint-lockfile does not actually check that all packages are resolved: lirantal/lockfile-lint#196


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

@jvanbruegge jvanbruegge requested review from a team as code owners September 25, 2024 16:08
Copy link

netlify bot commented Sep 25, 2024

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit bdc4dbf
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/66f43bcc67f5300008a1fb58

Copy link

netlify bot commented Sep 25, 2024

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit bdc4dbf
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/66f43bcc09270c0008a2a2a3
😎 Deploy Preview https://deploy-preview-11509--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@BeryJu
Copy link
Member

BeryJu commented Sep 25, 2024

5f08485 should already fix this, no?

Ah that fixes the npm command but doesn't re-add it to CLI

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.67%. Comparing base (004fb10) to head (bdc4dbf).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11509      +/-   ##
==========================================
- Coverage   92.75%   92.67%   -0.08%     
==========================================
  Files         736      736              
  Lines       36510    36510              
==========================================
- Hits        33864    33835      -29     
- Misses       2646     2675      +29     
Flag Coverage Δ
e2e 49.16% <ø> (-0.12%) ⬇️
integration 24.98% <ø> (ø)
unit 90.25% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jvanbruegge
Copy link
Contributor Author

Ah, I did not see that. And it only solves the issue partially. There are still a few packages in web/package-lock.json that are missing their integrity (I was already wondering why only so few) and the whole website/package-lock.json is missing the fields.

@jvanbruegge
Copy link
Contributor Author

Found why there were a few packages in web without integrity, the check only checked for top level depedencies, however you now also have subpackages. The fix is quite easy

@BeryJu
Copy link
Member

BeryJu commented Sep 25, 2024

I'm assuming you're using the same method to get the integrity values by rm -rf node_modules package-lock.json; npm i?

@jvanbruegge
Copy link
Contributor Author

jvanbruegge commented Sep 25, 2024

No, that might change the version of the package. I used this https://github.com/jeslie0/npm-lockfile-fix to only add the integrity and resolved field, all package versions stay as they were locked

@BeryJu BeryJu changed the title Fix missing integrity fields in package-lock.json, renable ci check web: Fix missing integrity fields in package-lock.json Sep 27, 2024
@BeryJu
Copy link
Member

BeryJu commented Sep 27, 2024

/cherry-pick version-2024.8

@BeryJu BeryJu merged commit cdeed5e into goauthentik:main Sep 27, 2024
67 checks passed
Copy link
Contributor

Cherry-pick failed with Merge error cdeed5e13b80ba29aceaa4712fa8d993cb7070c9 into temp-cherry-pick-c8d897-version-2024.8

BeryJu pushed a commit that referenced this pull request Sep 27, 2024
* web: Fix missing integrity fields in lockfile

* website: revert lockfile lint, re-add integrity

* web,website: Require integrity also for subpackages

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
# Conflicts:
#	web/package-lock.json
#	website/package-lock.json
#	website/package.json
kensternberg-authentik added a commit that referenced this pull request Sep 27, 2024
* main:
  website: update release notes for 2024.8.3 and 2024.6.5 (#11541)
  website/docs: added a Docs banner to announce new docs structure (#11525)
  security: fix CVE-2024-47070 (#11536)
  security: fix CVE-2024-47077 (#11535)
  sources/ldap: fix ms_ad userAccountControl not checking for lockout (#11532)
  web: Fix missing integrity fields in package-lock.json (#11509)
  core, web: update translations (#11527)
  core: bump ruff from 0.6.7 to 0.6.8 (#11528)
  web: bump the wdio group across 2 directories with 3 updates (#11529)
  web: bump @patternfly/elements from 4.0.1 to 4.0.2 in /web (#11530)
  web: bump @types/node from 22.7.2 to 22.7.3 in /web (#11531)
@WilliButz
Copy link

@jvanbruegge @BeryJu thank you!

I really don't get why this is not recognized as a problem upstream in npm cli :/

WilliButz added a commit to nix-community/authentik-nix that referenced this pull request Sep 27, 2024
Fixes CVE-2024-47070 and CVE-2024-47077

See https://docs.goauthentik.io/docs/releases/2024.8#fixed-in-202483

Dropped manually resolved lockfiles, fixed upstream in
goauthentik/authentik#11509

Flake lock file updates:

• Updated input 'authentik-src':
    'github:goauthentik/authentik/f5580d311d01f2202b666f76931ed04f30b9ec30' (2024-09-07)
  → 'github:goauthentik/authentik/91d2445c61da49026f76dceb7f5b524e30335a42' (2024-09-27)
kensternberg-authentik added a commit that referenced this pull request Sep 27, 2024
…able

* web/bug/fix-wdio-and-lint:
  Forgot to run prettier.
  web: small fixes for wdio and lint
  providers/oauth2: improve indexes on tokens (#11543)
  web: bump API Client version (#11544)
  release: 2024.8.3 (#11542)
  package-lock.json update
  website: update release notes for 2024.8.3 and 2024.6.5 (#11541)
  website/docs: added a Docs banner to announce new docs structure (#11525)
  security: fix CVE-2024-47070 (#11536)
  security: fix CVE-2024-47077 (#11535)
  sources/ldap: fix ms_ad userAccountControl not checking for lockout (#11532)
  web: Fix missing integrity fields in package-lock.json (#11509)
  core, web: update translations (#11527)
  core: bump ruff from 0.6.7 to 0.6.8 (#11528)
  web: bump the wdio group across 2 directories with 3 updates (#11529)
  web: bump @patternfly/elements from 4.0.1 to 4.0.2 in /web (#11530)
  web: bump @types/node from 22.7.2 to 22.7.3 in /web (#11531)
kensternberg-authentik added a commit that referenced this pull request Sep 27, 2024
* web/bug/fix-wdio-and-lint:
  Forgot to run prettier.
  web: small fixes for wdio and lint
  providers/oauth2: improve indexes on tokens (#11543)
  web: bump API Client version (#11544)
  release: 2024.8.3 (#11542)
  package-lock.json update
  website: update release notes for 2024.8.3 and 2024.6.5 (#11541)
  website/docs: added a Docs banner to announce new docs structure (#11525)
  security: fix CVE-2024-47070 (#11536)
  security: fix CVE-2024-47077 (#11535)
  sources/ldap: fix ms_ad userAccountControl not checking for lockout (#11532)
  web: Fix missing integrity fields in package-lock.json (#11509)
  core, web: update translations (#11527)
  core: bump ruff from 0.6.7 to 0.6.8 (#11528)
  web: bump the wdio group across 2 directories with 3 updates (#11529)
  web: bump @patternfly/elements from 4.0.1 to 4.0.2 in /web (#11530)
  web: bump @types/node from 22.7.2 to 22.7.3 in /web (#11531)
  web: small fixes for wdio and lint
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.

Feat: Validate missing integrity fields
3 participants