-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
minified/obfuscated resources in "pages/static"; privacy breach #879
Comments
Ping? |
cc @vmarmol. On Mon, Oct 12, 2015 at 5:00 PM, Dmitry Smirnov [email protected]
|
Another pitfall of embedding is that it makes build fragile. For instance, Bootstrap v3.3.5 contains
which breaks compilation as follows if Bootstrap is upgraded in
|
Totally agree it's weird to embed the js/CSS in the go files manually but embedding the static content in the final binary is something we would want to keep to make distribution easy. go bindata or rice would be much better ways to do this. Do you fancy submitting a PR to fix this? |
"Making distribution easy" is not worth it. Why not leave distribution to GNU/Linux distros? |
Embedding the files in the binary means you don't have to worry about packaging debs/rpms/etc. You can just ship the binary & that is portable including static resources. This is a pretty common thing to do in the go world. Totally agree that the way cadvisor currently does this needs improvement. I'll see if I get time to take a look. |
Frankly it is a terrible practice -- too bad if it is "common". We do need proper packages and personally I won't install anything that is not packaged. I find it uncomfortable to have humongous "everything-included" executables with no security support... :(
Thank you. |
While taking a quick look at this (go rice looks promising btw) I noticed that locally hosting the JS for the charting library breaks Google's ToS: see both https://developers.google.com/chart/interactive/faq#offline & https://developers.google.com/chart/interactive/faq#localdownload. @vishh Thoughts? Do we need to remove the local copies of gcharts & jsapi so as not to break Google's (your employer's) ToS in one of their own OSS projects? |
:) I'm fine with removing it from the binary. I'm not sure why it got added On Tue, Oct 13, 2015 at 1:49 AM, Jimmi Dyson [email protected]
|
This is still an outstanding issue... :( |
Seconded. In particular, it seems to make it impossible to use the prometheus-nginx-exporter on Debian, as it forces the Debian package of cadvisor to have the web ui disabled. |
Files in pages/static contain embedded JavaScript and CSS resources in minified obfuscated form. This is a bad practice just like committing pre-build binaries.
Those files should be composed on build time.
Minified resources are same as pre-compiled binaries -- un-readable, non-modifiable and non-distributable in Debian.
Lately it's been demonstrated how minified JavaScript can become an attack vector (i.e. security breach).
It is hard to check whether minified resources were tampered with.
Finally there is a privacy breach as resources bundled to
pages/static
have references to external web sites such as google.com and ajax.googleapis.com.Please replace minified resources with original uncompressed ones (please make sure that there are no external references), compose static
.go
resources on build-time and avoid committing minified junk to source tree.Thanks.
The text was updated successfully, but these errors were encountered: