dashorst commented on code in PR #1869: URL: https://github.com/apache/wicket/pull/1869#discussion_r4535195539
########## REVIEW.md: ########## @@ -0,0 +1,149 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +# Reviewing a change to Apache Wicket + +What a review of a pull request checks, whoever does it: a committer, a contributor or an agent. +The conventions for writing a change — format, commits, build, API compatibility, Javadoc, +comments, language and security — are in `AGENTS.md`. A review checks the change against those as +well; this file adds what is easy to miss when a change otherwise looks right. + +Each section opens with when it applies. A review is done when every section the change +triggers is accounted for: confirmed, or a finding naming the file and line. A finding is +resolved in the change itself, in the same pull request. Review Comment: Applied as suggested in 1689006c21, folded into the PR's single commit. ########## REVIEW.md: ########## @@ -0,0 +1,149 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +# Reviewing a change to Apache Wicket + +What a review of a pull request checks, whoever does it: a committer, a contributor or an agent. +The conventions for writing a change — format, commits, build, API compatibility, Javadoc, +comments, language and security — are in `AGENTS.md`. A review checks the change against those as +well; this file adds what is easy to miss when a change otherwise looks right. + +Each section opens with when it applies. A review is done when every section the change +triggers is accounted for: confirmed, or a finding naming the file and line. A finding is +resolved in the change itself, in the same pull request. + +## License compliance + +Applies when the change adds a file, adds or upgrades a dependency, or copies third-party material +into the source tree. + +- A file that can't carry the ASF license header is listed in `.rat-excludes`, with a reason; + RAT fails the build on any other file without one. +- A new dependency, or a new version of one, is under a license the ASF allows: category A, or + category B, which may only be included in binary form, never as source copied into the tree. + Category X licenses (GPL, AGPL, LGPL and their like) are never allowed. The categories are + listed at https://www.apache.org/legal/resolved.html. +- Third-party code, scripts, styles, fonts or images copied into the source tree are listed in + `LICENSE`, with the license text in `licenses/`. When they end up in a published jar, they are + listed in `LICENSE-binary` as well. `NOTICE` changes only when the third party's own license or + NOTICE file requires an attribution there. +- A Maven dependency is not bundled, so it needs no entry in these files, unless it is shaded or + copied into a Wicket artifact. + +## Security + +Applies when the change writes a value into markup, JavaScript, a URL or a header; reads request +input; adds or changes a listener, a resource or a request mapper; or touches encryption, the page +store or authorization. `SECURITY.md` states what Wicket trusts: a change keeps to that model, or +changes `SECURITY.md` in the same pull request. + +- A component escapes the model data it renders while `escapeModelStrings` is on. A bundle value + is escaped for the context it is written into: `Strings#escapeMarkup` for markup, + `JavaScriptUtils#escapeQuotes` for a JavaScript literal. `escapeMarkup` covers element text and + quoted attribute values only; a value inside `<script>` or `<style>`, in an unquoted attribute + or in a URL needs an encoding for that context. +- Request parameters, headers, cookies and uploaded file names are untrusted. The host, port and + scheme come from the container, and `X-Forwarded-*` headers count only through + `XForwardedRequestWrapperFactory`. +- A new listener is invoked through the request cycle, so `ResourceIsolationRequestCycleListener` + and `Component#canCallListener` apply to it, and it runs only on an enabled, visible component. +- A resource served from the classpath passes `IPackageResourceGuard`, and a path built from + request input stays inside the directory it was meant for. +- Encryption uses an authenticated scheme and a `SecureRandom`; `CryptoMapper` is the only place + that encrypts deterministically. Keys, session ids and stored values stay out of logs and out of + the error pages rendered in `DEPLOYMENT` mode. +- Nothing deserializes data a client can supply. +- A fix for an unreleased vulnerability keeps that out of its title, commit message and branch + name, as `AGENTS.md` describes. Review Comment: Applied as suggested in 1689006c21, folded into the PR's single commit. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
