Automate adding security OWNERS files |
||||
Issue descriptionI made an edit to a "traits" file ui/gfx/ipc/skia/gfx_skia_param_traints.cc and then the commit failed. The failure told me to add an OWNERS file to that directory, and to paste in some pre-defined text. I'm dumb, and misinterpreted their directions, so I lost nearly a day trying "alternate" ways to fix it (e.g. adding more security reviewers) If this is being automatically detected, with an automated "fix" in mind, can we actually automate this and not leave it for unsuspecting devs (assuming there are other directories that would need such a file added). Can this be done by a house-keeper bot and have those "needed" files get added/checked?
,
Apr 20 2017
Correct, we don't want presubmits to modify your checkout by default. Generally for this sort of thing we have errors like "X failed, run fix-X to fix it", where fix-X is some script to do the semi-automated thing. Arguably we could add a mode to the presubmit check to ask if you wanted to fix the errors right then, though.
,
Apr 21 2017
I guess what we could do is make a simple command you could run. But I think we'd want a formatter for OWNERS files too then. Proposal: - Adding a formatter for OWNERS files - Enabling it by default via some PRESUBMIT check - Implement a simple script that can insert lines into OWNERS files, invoking the formatter - Update the IPC security presubmit to point people at running this command. Sound reasonable?
,
Apr 21 2017
I'm not sure that there's really anything to do when formatting owners files, given that they're just single lines of text with no indentation or anything. I suppose we could define an ordering, but it feels like that's probably more trouble than it's worth. +jochen, who has actually been mucking in just this code lately.
,
Apr 21 2017
Mostly it's just an ordering. For example, we'd probably want TEAM/COMPONENTS lines near the top. It'd also be nice to have logically related blocks grouped together: it would be nice if the IPC-related rules stayed relatively close together, rather than getting interspersed throughout as rules are added/removed over time, etc. Maybe it doesn't really matter though.
,
Apr 21 2017
I'm just worried that we could spend a lot of time debating orderings, and it's not particularly clear how we'd even be able to enforce them without trying to add a lot more structure to the files.
,
Jul 19 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by dcheng@chromium.org
, Apr 20 2017