You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "coderkun (via GitHub)" <gi...@apache.org> on 2023/10/19 15:10:13 UTC

[PR] Upgrade Underscore.js to version 1.13.6 [tapestry-5]

coderkun opened a new pull request, #45:
URL: https://github.com/apache/tapestry-5/pull/45

   Tapestry uses [Underscore.js](http://underscorejs.org/) version 1.8.3, which is more than eight years old (April 2015) and includes some security vulnerabilities. I would like to upgrade it to the latest version, which is currently 1.13.6, to fix the security issues.
   
   It would be great to include this change in the next bug fix version of Tapestry, 5.8.4.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [PR] Upgrade Underscore.js to version 1.13.6 [tapestry-5]

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, Nov 6, 2023 at 7:30 AM Oliver Hanraths
<ol...@gallerysystems.com.invalid> wrote:
>
> Hi Ben,

Hi!

> > However, if you need to mitigate immediately, you could replace
> > underscore in any version with a config override:
>
> Yeah, I know. Even though the affected file won’t be used by the
> application it would still be there and be detected by security scanners
> on the server.

Only if the security scanner guess the outdated file's URL. With Ben's
code, the outdated one wouldn't be included in pages at all.

> Or do you happen to know a way to exclude the file (from within the
> Tapestry core lib) from the final war file, e. g. a Gradle task?

You can create an URL rewrite rule to make requests to the old file go
to the new one or write a Dispatcher or RequestFilter that return a
404 status for it.

>
> Thanks a lot,
> Oliver



-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [PR] Upgrade Underscore.js to version 1.13.6 [tapestry-5]

Posted by Ben Weidig <be...@netzgut.net>.
On Mon, Nov 6, 2023 at 11:30 AM Oliver Hanraths wrote:

>
> that would be much appreciated.
>

We will do a minor bugfix release soon, but I want to include TAP5-2768
(another pentest finding) which should be done tomorrow.


> Yeah, I know. Even though the affected file won’t be used by the
> application it would still be there and be detected by security scanners
> on the server.
>

Our pentest was "black box", so we only needed the override to mitigate.


> Or do you happen to know a way to exclude the file (from within the
> Tapestry core lib) from the final war file, e. g. a Gradle task?
>

I've looked into it, but there seems to be no simple solution like using
exclude(...) in Gradle.


If you really can't wait for 5.8.4, two options come to mind:

   - Build your own Tapestry jars and use those. We did this in the past,
   but we run our own Sonatype Nexus. Thanks to GitHub Actions and GitHub
   Packages, it might be easier now, but it's still some work to set up.
   - Extract war/jar, remove the file, and re-zip everything correctly
   before deployment.


Cheers
Ben

Re: [PR] Upgrade Underscore.js to version 1.13.6 [tapestry-5]

Posted by Oliver Hanraths <ol...@gallerysystems.com.INVALID>.
Hi Ben,

On Do, 2023-11-02 at 08:45 +0100, Ben Weidig wrote:
> AFAIK there's no release planned right now, but I concur that even a
> smaller one might be warranted due to fixing a CVE.

that would be much appreciated.

> However, if you need to mitigate immediately, you could replace 
> underscore in any version with a config override:

Yeah, I know. Even though the affected file won’t be used by the 
application it would still be there and be detected by security scanners 
on the server.

Or do you happen to know a way to exclude the file (from within the 
Tapestry core lib) from the final war file, e. g. a Gradle task?

Thanks a lot,
Oliver

Re: [PR] Upgrade Underscore.js to version 1.13.6 [tapestry-5]

Posted by Ben Weidig <be...@netzgut.net>.
Hi Oliver,

AFAIK there's no release planned right now, but I concur that even a
smaller one might be warranted due to fixing a CVE.

However, if you need to mitigate immediately, you could replace underscore
in any version with a config override:

@Contribute(JavaScriptStack.class)
@Core
public static void
setupCoreJavaScriptStack(OrderedConfiguration<StackExtension> conf) {
    conf.override("underscore-library",
StackExtension.library("META-INF/assets/underscore-1.13.6.umd.min.js"));
}

Cheers
Ben

On Wed, Nov 1, 2023 at 11:59 AM Oliver Hanraths
<ol...@gallerysystems.com.invalid> wrote:

> Hi Tapestry devs,
>
> On Sa, 2023-10-21 at 14:02 +0000, benweidig (via GitHub) wrote:
> > benweidig merged PR #45:
> > URL: https://github.com/apache/tapestry-5/pull/45
>
> with TAP5-2765 being merged and a couple of other bug fixes in 5.8.4,
> would it be possible to release version 5.8.4? Some of our clients are
> eager to get the underscore.js security vulnerability addressed.
>
> Thanks and best regards,
> Oliver
>

Re: [PR] Upgrade Underscore.js to version 1.13.6 [tapestry-5]

Posted by Oliver Hanraths <ol...@gallerysystems.com.INVALID>.
Hi Tapestry devs,

On Sa, 2023-10-21 at 14:02 +0000, benweidig (via GitHub) wrote:
> benweidig merged PR #45:
> URL: https://github.com/apache/tapestry-5/pull/45

with TAP5-2765 being merged and a couple of other bug fixes in 5.8.4, 
would it be possible to release version 5.8.4? Some of our clients are 
eager to get the underscore.js security vulnerability addressed.

Thanks and best regards,
Oliver

Re: [PR] Upgrade Underscore.js to version 1.13.6 [tapestry-5]

Posted by "benweidig (via GitHub)" <gi...@apache.org>.
benweidig merged PR #45:
URL: https://github.com/apache/tapestry-5/pull/45


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [PR] Upgrade Underscore.js to version 1.13.6 [tapestry-5]

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, Oct 19, 2023 at 1:53 PM Numa Schmeder <nu...@dfacto.ch> wrote:

> Hello,

Hi!

> Why don’t we update tapestry to use webpack and stop using underscore all together. It would make much more sense.
> We could also upgrade all tapestry async handling at least partial page rendering with a library like: https://hotwired.dev/
> There is a reference implementation for ruby. Could this be interesting for the future of Tapestry ?

Tapestry's Zone component already does what I understand Hotwired
does: rendering HTML server-side and send it to the client to be
applied unchanged to the client-side HTML DOM.  So I'm afraid I don't
see the benefit of using Hotwired in Tapestry.

>
> Best,
>
>
>   <http://www.dfacto.ch/>       Numa Schmeder    www.dfacto.ch  <http://www.dfacto.ch/>
> NUMA@DFACTO.CH <ma...@dfacto.ch>   |   M +41 79 538 30 01
>
> DIGITAL STRATEGY   |   DESIGN   |   DEVELOPMENT
>
>
>
>
> > Le 19 oct. 2023 à 17:28, benweidig (via GitHub) <gi...@apache.org> a écrit :
> >
> >
> > benweidig commented on PR #45:
> > URL: https://github.com/apache/tapestry-5/pull/45#issuecomment-1771222694
> >
> >   We ran into the same issue after a recent pen test and updated it internally; there have been no issues so far.
> >
> >   Initially, I thought about removing underscore.js altogether, as only a few methods appeared to be used.
> >   After a closer look, there are 23 methods used, and removing the library would introduce a breaking change anyway.
> >   So updating it is the better approach.
> >
> >   For easier release management, I will create a Jira ticket this weekend to track the changes before merging the PR.
> >
> >
> > --
> > This is an automated message from the Apache Git Service.
> > To respond to the message, please log on to GitHub and use the
> > URL above to go to the specific comment.
> >
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> >
> > For queries about this service, please contact Infrastructure at:
> > users@infra.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: dev-help@tapestry.apache.org
> >
>


-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [PR] Upgrade Underscore.js to version 1.13.6 [tapestry-5]

Posted by Numa Schmeder <nu...@dfacto.ch>.
Hello,

Why don’t we update tapestry to use webpack and stop using underscore all together. It would make much more sense. 
We could also upgrade all tapestry async handling at least partial page rendering with a library like: https://hotwired.dev/
There is a reference implementation for ruby. Could this be interesting for the future of Tapestry ?

Best,


  <http://www.dfacto.ch/>	Numa Schmeder    www.dfacto.ch  <http://www.dfacto.ch/>
NUMA@DFACTO.CH <ma...@dfacto.ch>   |   M +41 79 538 30 01 

DIGITAL STRATEGY   |   DESIGN   |   DEVELOPMENT


 

> Le 19 oct. 2023 à 17:28, benweidig (via GitHub) <gi...@apache.org> a écrit :
> 
> 
> benweidig commented on PR #45:
> URL: https://github.com/apache/tapestry-5/pull/45#issuecomment-1771222694
> 
>   We ran into the same issue after a recent pen test and updated it internally; there have been no issues so far.
> 
>   Initially, I thought about removing underscore.js altogether, as only a few methods appeared to be used.
>   After a closer look, there are 23 methods used, and removing the library would introduce a breaking change anyway.
>   So updating it is the better approach.
> 
>   For easier release management, I will create a Jira ticket this weekend to track the changes before merging the PR.
> 
> 
> -- 
> This is an automated message from the Apache Git Service.
> To respond to the message, please log on to GitHub and use the
> URL above to go to the specific comment.
> 
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> 
> For queries about this service, please contact Infrastructure at:
> users@infra.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
> 


Re: [PR] Upgrade Underscore.js to version 1.13.6 [tapestry-5]

Posted by "benweidig (via GitHub)" <gi...@apache.org>.
benweidig commented on PR #45:
URL: https://github.com/apache/tapestry-5/pull/45#issuecomment-1771222694

   We ran into the same issue after a recent pen test and updated it internally; there have been no issues so far.
   
   Initially, I thought about removing underscore.js altogether, as only a few methods appeared to be used.
   After a closer look, there are 23 methods used, and removing the library would introduce a breaking change anyway.
   So updating it is the better approach.
   
   For easier release management, I will create a Jira ticket this weekend to track the changes before merging the PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org