Commit Graph
99 Commits
Author SHA1 Message Date
Francois Marier d1890ed3d4 Merge pull request #11819 from brave/fmarier-patch-1
Make sec-team the owner of the audit_deps script
2022-01-14 13:26:50 -08:00
Chris Hudson 84a40d9eac Add write permission to PRs when using GITHUB_TOKEN 2022-01-13 11:55:28 -05:00
Francois Marier 58db2b6960 Make sec-team the owner of the audit_deps script
There is a comment in the code to ask for a review from the sec-team, but we may as well enforce it.
2022-01-11 18:21:40 -08:00
Pete Miller 99de6ebbf9 Add and look for CI/storybook-url label for CI storybook deploys 2022-01-06 12:03:17 -08:00
Chris Hudson 90dc7adc98 Add rebase for ready for review PR state 2022-01-06 09:23:22 -05:00
Chris Hudson b93adf0519 Update labeller to correct storybook label 2021-12-15 14:57:01 -05:00
Chris Hudson 8100785872 Add auto label for storybook related changes 2021-12-15 14:57:00 -05:00
Pete Miller 7793971af3 Merge pull request #10981 from brave/pr-template-commit-squashing 2021-12-10 11:30:20 -08:00
Wojciech Knapik 2427be4c27 Prevent PR labels from being auto-removed (#11541) 2021-12-09 23:39:14 +01:00
Wojciech Knapik a56d07f8be Added rules for automatically labeling PRs with CI/run-network-audit (#11239) 2021-11-23 19:03:09 +01:00
Wojciech Knapik ed31cd9d58 Run audit deps in PRs when audit_deps.py is updated (e.g. new suppresions added) (#11209) 2021-11-22 14:56:44 +01:00
Wojciech Knapik 49dbf15ade Added an action to label PRs with potential-layer-violation-fixes if they touch a BUILD.gn file with check_includes = false (#11130) 2021-11-19 18:17:16 +01:00
Mihai PLESA 8a4ebb9aa3 added code owners for deps (#11100) 2021-11-15 19:48:20 -05:00
Mihai PLESA 65c7c2fb5b Create rebase.yml 2021-11-14 15:39:07 -05:00
Wojciech Knapik 3e67cba16d Added a github action to add the CI/run-audit-deps label if dependency files are changed (#11017) 2021-11-11 18:29:46 +01:00
Wojciech Knapik 1bd0d9d27b Removed the github action to label PRs. (#10988) 2021-11-10 16:22:55 -05:00
Wojciech Knapik c5b46b7758 Added a github action to add the CI/run-audit-deps label when dependencies are modified (#10978)
* Added github action to add the CI/run-audit-deps label.

* Modified package.json.
2021-11-10 15:51:17 -05:00
Pete Miller c413ef4a38 Pull Request template encourages squashing of fixup / review feedback commits
Encouraging a clean git history makes for a more readable log of file changes. 
Commit message are much more readable when they talk about features or bug fixes (as described in the existing checklist item about good commit descriptions).

Aim is to prevent a lot of commits which talk about the journey of a PR, such as fixing CI build issues and addressing review feedback, rather than talking about improvements to the project.
2021-11-10 10:19:30 -08:00
Mario Sanchez Prada a3839717fa Rework npm run network-audit into a browser test suite (#10389)
* Rework npm run network-audit into a browser test suite

This change adds a new browser test to brave_browser_tests that runs
similar tests to what Brave used to do when running the network-audit
npm script, via the --network_log command line parameter.

As with that previous script, this test makes sure Brave is launched
with --net-log-capture-mode=Everything and --log-net-log, and that
the network_log.json and network-audit-results.json files are written
to disk after the network audit process is completed. However, in this
case we're also prepending the name of the browser test to the names
of such files, so that we can have more than one browser test without
overriding each others' results.

Last, this tests adds two browser tests to check both the case of
loading the simple.html file via the embedded test server and the
more real world scenario of loading brave://welcome, in a final
attempt to replicate what npm run network-audit did for me on a
recent build (and also as a way to validate that having multiple
browser tests will work fine).

Resolves https://github.com/brave/brave-browser/issues/7207
Resolves https://github.com/brave/brave-browser/issues/7281

* Remove all trace of npm run network-audit and replace it where needed

Drop code related to the npm run network-audit command, including the
command itself, and then make sure that the newly added browser tests
are run as part of the npm run test-security command.

Also, this change moves the definitions of the three whitelists used
by the network audit process (i.e. protocols, prefixes and patterns)
to a separate header file so that we can adapt .github/CODEOWNERS to
only cover those lists and not the browser tests themselves.

Last, also adapt Jenkinsfile to remove all references to the former
npm run network-audit command.

* Remove Google-owned prefixes and patterns from network audit whitelist

As noted by @diracdeltas on Slack, these entries should be removed as
they correspond with internal 307 responses that should not be going
out to the network, so we're dropping them as part of this work.

* Extract brave_network_audit_browsertest.cc to a separate binary

A proper re-implementation of these tests will require to "leave the
browser open" for at least 2 minutes, for which we'd need to pass a
big timeout parameters when running the browser tests, delaying the
execution of the brave_browser_tests for no good reason.

Instead, we create a new test suite 'brave_network_audit_tests' that
will exclusively perform the network audit process, so that we can
specify a different timeout only for it (in a follow-up patch).

* Force BraveNetworkAuditTest tests to keep the browser open after load

Similarly to what was done via the npm run network-audit script, we
make sure that we wait ~2 minutes after loading an URL to make sure
we gather enough information (i.e. network requests) before verifying
that no allowed URL requests are made during that time.

In one hand, this means explicitly waiting test until such amount of
time has passed in the tests themselves. In the other hand, this also
means passing specific timeout values to the brave_network_audit_tests
when running it via the npm run test-security script.

* Simplify BraveNetworkAuditTest test suite by having one browser test

Having separate tests was nice in order to be able to run them in
parallel but, at the same time, was probably not necessary because
we want to test the behaviour of firing up one browser and monitoring
network requests after loading some URLs, so probably better to go
back to having one test only.

Additionally, this allows simplifying a bit the creation of the json
files with the log of the requests and the result of the audit, which
don't need having a test-based prefix anymore.

* Whitelist https://laptop-updates-staging.brave.com for network audit

This staging-related URL might be present on devs' machines if they
have it set on their .npmrc file, for instance, so let's add it to
the whitelisted entries similarly to how other staging-related URLs
are already present there.

* Don't whitelist http://componentupdater.brave.com/service/update2

As suggested by @diracdeltas, we can remove the HTTP version of this
URL from the whitelist for the network audit (see [1]).

[1] github.com/brave/brave-core/pull/10389#discussion_r723587821

* Increase timeout for network-audit browser tests to 5min after loads

It seems some network requests might take longer than 2 minutes to
happen, so let's increase the timeout to 5 minutes after loading the
URLs, and adapt the caller script to account for that.

* Also check network requests on brave://rewards with Brave Rewards enabled

Add one more case to the network audit process to double check whether
only allowed network requests happen when Brave Rewards is enabled.

* Whitelist Brave Rewards-related URL prefixes for the network audit

This means whitelisting the following prefixes, found to be hit in
the test after enabling Rewards and waiting for ~5 minutes:

On production environments (e.g. Relese builds on CI):

  - https://api.rewards.brave.com/v1/parameters
  - https://rewards.brave.com/publishers/prefix-list
  - https://grant.rewards.brave.com/v1/promotions

On development environments:

  - https://api.rewards.bravesoftware.com/v1/parameters",
  - https://rewards-stg.bravesoftware.com/publishers/prefix-list",
  - https://grant.rewards.bravesoftware.com/v1/promotions",

* Restore network-audit and define test-security in terms of it

* Disable the ThinLTO cache for the brave_network_audit_tests GN target

We need to disable the ThinLTO cache or the linker will die with
a "Resource temporarily unavailable" error due to the linking
reaching the vm.max_map_count limit of 65530 memory mappings.

* Use JSONFileValueSerializer instead of base::JSONWriter

* Replaced use of deprecated APIs with the correct ones
2021-11-10 19:09:13 +01:00
bridiver 26fedc02a8 fix path for commands 2021-08-19 11:43:28 -07:00
Francois Marier 450d856718 Remove Joe and I from the ads-client 2021-07-12 17:08:27 -07:00
Kyle Hickinson 52ec010182 Move iOS code from brave/vendor to brave/ios 2021-06-30 16:52:00 -04:00
Brian Johnson 4f8c1a9aba add code owner for build commands (#9241) 2021-06-26 10:03:30 -05:00
Francois Marier 15673518c5 Changes to the pinset requires a review from the sec team 2021-06-15 15:13:44 -07:00
bridiver 55ae7989e2 add groups for chromium-src and deps code owners 2021-06-08 12:17:43 -07:00
jbmagination 698b456581 Update handbook links to point to the public wiki 2021-06-04 15:34:30 -04:00
Francois Marier ea7f803c16 Restore network auditor CODEOWNERS. 2021-05-17 18:42:16 -07:00
Terry Mancey 8fd64ce0ff Fix issue with CODEOWNERS file 2021-05-06 11:36:28 -05:00
Terry Mancey a7009f96ee Add privacy team as code owners for Brave Ads privacy project folder 2021-04-29 16:53:19 -05:00
Brian Clifton c2c33f1e75 Fix codeowners for rewards client team 2021-04-27 09:29:35 -07:00
Aleksey Khoroshilov 58370b1144 Narrow down CODEOWNERS to lifetime/expiration files. 2021-04-13 14:58:56 +07:00
Aleksey Khoroshilov 1a0dc91b35 Add @akhoroshilov to permissions codeowners. 2021-04-12 15:07:16 +07:00
Anthony Tseng 261db38362 Remove compiler:exceptions config and add indirectly sources, visibility and include_rules to bitcoin-core 2021-03-31 09:56:57 -07:00
Francois Marier eea963e7aa Add a security review step to the reviewer's checklist too. 2021-02-22 10:52:04 -08:00
Francois Marier 5824b0ee15 Move security review item up and reword it.
Add links to the relevant documentation.
2021-02-22 10:45:24 -08:00
Mihai PLESA e740dcf465 assign pr to author (#8008) 2021-02-19 20:25:01 +00:00
Brian Johnson 6dc6af9cb1 Merge pull request #7858 from brave/issues/14024
fix checkdeps.py
2021-02-08 11:35:32 -07:00
Mihai PLESA 9dd7a50b83 Update PULL_REQUEST_TEMPLATE.md (#7816) 2021-02-08 17:30:43 +00:00
bridiver fb3c0f5561 buildtools/checkdeps/checkdeps.py brave --extra-repos=brave runs succesfully 2021-02-06 13:34:00 -07:00
Ivan Efremov 7aeffd8a4c 13654: Fix owners of speedreader rust impl.
Fix https://github.com/brave/brave-browser/issues/13654
2021-01-19 21:46:57 +07:00
yan e9aeaaa1e5 fix codeql yaml syntax error
github autogenerated a file that was invalid because of our branch-matching regex. this manually fixes it.

also skips the run for c++/java because codeql doesn't know how to build
those

fix https://github.com/brave/brave-browser/issues/13431
2021-01-07 15:07:21 -08:00
yan 28f21f4ab5 Add codeql-analysis file 2021-01-07 14:41:47 -08:00
samartnik 94b6fce3af Added @samartnik as a code owner for java patching 2020-12-16 11:17:12 -05:00
iefremov 3af63cd844 Merge pull request #7140 from brave/ie_chklst
12691: Improve the PR checklist.
2020-11-17 12:41:39 +07:00
Ivan Efremov 758bc95038 12691: Add more labels and restore a license reminder. 2020-11-17 12:38:20 +07:00
Ivan Efremov 82b7829997 12691: Fix a doc link, reorder, add tslint. 2020-11-16 13:56:11 +07:00
Ivan Efremov 39d5f4455c 12691: Improve the PR checklist.
Resolves https://github.com/brave/brave-browser/issues/12691

The idea is to clean up the checklist and leave only relevant
and important entries. Also populate the reviewers section with
frequently overlooked issues.
2020-11-13 19:16:55 +07:00
Brian R. Bondy c11539211b Update CODEOWNERS to use crypto-wallets team 2020-11-09 15:10:19 -05:00
NejcZdovc 39a6591a39 Switch from single to team code owners
Resolves https://github.com/brave/brave-browser/issues/12132
2020-10-14 07:30:12 +02:00
Anthony Tseng 0cd33551db Use team for brave sync code owners 2020-10-13 14:19:30 -07:00