dependabot / dependabot-core

🤖 Dependabot's core logic for creating update PRs.
https://docs.github.com/en/code-security/dependabot
MIT License
4.52k stars 938 forks source link

check also deps added to HTML files (libs at CDN, etc.) #3228

Open dkocich opened 3 years ago

dkocich commented 3 years ago
asciimike commented 3 years ago

For local dependencies, it feels like a bundler like webpack or browserify is going to be the best solution, since that shouldn't have versions in the HTML.

This obviously doesn't work for CDN delivered content, so you can either include it locally and bundle it as above, or pin to a @latest if such a thing is provided (though if they do major version updates, it has the potential to break you, looks like jsdelivr offers @major which might work well). But if they're just npm modules, going the bundler route feels like the "right" way to solve this.

dkocich commented 3 years ago

I understand that checking local dependencies and asset file updating might be a problem and it would need to also add deps locally - I added it to have 2 examples here. I do not want to use the @latest or @major and broke my project any time or implement tests in tens of projects because of that. I also do not want to use bundler bcs I do not want my users to redownload bundled jquery/momentjs for the 100th time again from another website...

I think that a simple configuration with the checked file path and "template syntax" should be enough for me to quickly configure dependabot so it can help me with maintenance and I can be notified about potential changes, short changelog summary, or link to docs for manual review. I think it might be helpful enough to check for 100-500 most downloaded libraries from CDN in the file (not all NPM deps or CDN content).

neviaumi commented 2 years ago

+1 for the feature of check inline CDN update. Renovate have this feature support already

Here is my use case,

Recently i want develop some simple HTML on github document.

It only contain html , js (web components), bootstrap CSS

So i don't want make it so complex with include WebPack, Babel ...etc. for just want dependence update working.

major commented 2 years ago

I do not want to use the @latest or @major

Just saying hello since you mentioned me. 👋🏻 🤭

MurrayJack commented 7 months ago

Did anything come from this? I would also like dependabot to chech static HTML file as we dont want to use a package maneger

user case

we have a old legacy MVC product this has a global template that supplies all the scripts these scripts use the <script and live on one of the public CDNs