capa
capa copied to clipboard
update copyright to 2024
update here: https://github.com/mandiant/capa/blob/9e5cc07a48fada9042e106c0b21504c80d58af21/.github/flake8.ini#L41
then fix the linter violations, and/or use a recursive sed
Hi there, I want to contribute to this.
At the bottom of the LICENSE.txt file on line 190, it still says Copyright (C) 2023 Mandiant, Inc. Should I update this?
every copyright instance of 2023 should be replaced with 2024 across all files
I think we don't need to do this, see https://nexb.com/do-you-really-need-to-update-the-copyright-each-new-year/:
Popular open source projects like Google’s Go, Microsoft’s VS Code, and Netflix’s Hystrix already just list the first year of the copyright. Others dropped years altogether – Facebook removed years from React, and so did GitHub, Facebook and Amazon.
let's also check with Google's open source office to see what they recommend. i don't feel strongly in any direction.
Google policy is to list the year that the file was introduced. We should not be updating the date from year to year.
We can use git history to figure out when each file was first added. It won't fully recover when files are moved around, but it's better than what we do today.
It's unfortunate that the header can't be consistent throughout and therefore easy to lint and check. Oh well.
I'm sympathetic to the positions taken by the other big projects, though I think we should follow the guidance of our org here. Thoughts?
I think using that policy makes sense. The initial update will be slightly more work, but then moving forward it should be easy.
Ok, I can work on this! So, I will go through the history, find the year of each file's original introduction, and then set that as the year in the file.
Sounds perfect.
Of course, I'd discourage you from doing this manually. Perhaps a one-off Bash or Python script can do it more quickly.
it seems most of the files already have the copyright of the file for the year that were introduced in or am i maybe missing something here ?
Yes, probably. The regex and some files probably need updating though.
If @JCoonradt isn't working actively on this issue anymore, is it okay if I give it a try? @williballenthin @mr-tz
Yes, I think you can go ahead.
Sorry for the delay; looking at the code right now, and if I understand right, any instance of copyright across any file type should be changed with its file origin year; asking cuz currently writing a recursive sed so I thought I should clear my doubt if I should just run it through all python executables (and also look for any regex statements) only or should I run it all across the repo looking for any instance of copyright and do the above action @mr-tz
@Atlas-64 yes, it should be across all source files. Please review the resulting diff and use your judgement to ensure only the relevant changes are made. The purpose here is to set only the copyright headers so that people that read the code understand the copyright and origins.
Okay, cool. I am done running the script; I just had a question about the license. Do I update it to 2024 or keep it as 2020(its origin) and the same doubt for the regex (just change it to 2024?) . It works perfectly fine for everything else. I ended up just writing a powershell script and running through the whole repo, used gits commit history to get the origin, and changed it accordingly through a recursive, so we are good on that part. I just had a doubt about the above 2 will make a PR after changing them .Thanks for any help :) @williballenthin
We want to list the year that the file was introduced.
closed via #2027