HNHacker News
TopNewBestAskShowJobs

greysteil

1,399 karma · joined March 25, 2012

submissionscomments
greysteil··on Bringing supply chain security features to the Go community
I'll make sure the Actions PMs see this. I _think_ I heard from a colleague that there's progress here.
greysteil··on Bringing supply chain security features to the Go community
PM for security products at GitHub here.

Totally agree. The good news is that I think GitHub is in a position to fix this - expect progress in the next 12 months.

One change that's needed here is data for each vulnerability on whether it's ever relevant in development. The advisory database that powers GitHub's security alerts (and npm audit, and NuGet audit) now has a dedicated curation team and is ready to curate more ecosystems and more information.

That data then needs to be hooked up with GitHub's security alerting logic. That shouldn't be too difficult - we already detect whether a dependency is used in development or production, and the team here is growing.

Finally, for this to work we'd need a new UI concept for vulnerabilities you aren't affected by. We're already working on functionality with a very similar requirement (one that tells you whether you're using the vulnerable function within a dependency).

I can't make promises, but I can say that GitHub has an increasing amount of energy. Expect progress :-)

greysteil··on Bringing supply chain security features to the Go community
We are, and we're talking to them. In an ideal world we would have loved to have merged the databases.

I expect the two databases will move in sync. The GitHub advisory database is licensed as CC BY 4.0 (i.e., attribution only), so we actively encourage others, including the Go Vulnerability Database, to pull from it.

greysteil··on Bringing supply chain security features to the Go community
Feature requests always welcome! I'll pass it on to the Dependabot team.
greysteil··on Bringing supply chain security features to the Go community
PM for security products at GitHub here (and one of the original authors of Dependabot).

Sorry to hear that. I wouldn't expect us to be telling you about 1-5 security issues a day - do you maybe have (non-security) version updates enabled? If so and they feel like spam to you I'd recommend turning them off. (I wish I had a better suggestion, but until Dependabot supports grouped updates it sounds like it just isn't right for you.)

Dependabot doesn't support grouped updates yet but we hear the feedback and the team wants to work on them. Most of the investment in Dependabot recently gone towards improving our infrastructure and improving the experience for security updates. The team is still relatively small (it's 7 people), and supporting a service like this at GitHub scale is hard, but we're keen to keep improving.

greysteil··on Behind GitHub’s new authentication token formats
The reason we (GitHub) kept the new tokens to 40 characters, matching the length of our old tokens, was to make this change as backwards compatible as possible. We’ve never documented or committed to our tokens being 40 characters long, but they’ve been that way a long time and there may be software out there storing them in a fixed length database columns.

If you use a service you’re worried the change may break I’d recommend minting a new token and trying it, perhaps on a new account on that service, before revoking your old one.

(We do plan to increase the length of our tokens in future, but not before July 2021 at the earliest.)

greysteil··on Lack of sleep, stress can lead to symptoms resembling concussion
If you haven’t already read it and are interested in sleep research, I found “Why we sleep” was a wonderful, accessible summary of the literature.
greysteil··on Facebook to staff: Avoid company-branded clothing for own safety
People are more than the company they work for. Be careful not to be reductionist by judging them too much on it.
greysteil··on Slack Running Slow / Hanging?
Slow for me
greysteil··on What will happen when you commit secrets to a public Git repo?
I think so, and we 100% should do, but I just did a test and the secret I committed was still working a full minute after I converted the repo. Could be that the scan was in a queue, could be that it didn't trigger.

I'll dig into it and make sure this is working and is fast - it's a critical time to do a full scan of the repo's git history.

greysteil··on What will happen when you commit secrets to a public Git repo?
Private repos need a different approach, but committing secrets to them can still be a problem.

If a secret is committed to a private repo then anyone with read access to that repo could use it. That might give those users more permissions than they're supposed to have. It's particularly a problem in large organisations, where thousands of developers may have access to a private repo, but should not necessarily have direct access to production infrastructure.

That said, the risk tradeoff when a secret is found in a private repo is different to when one is found in a public repo. If it's a personal private repo that no-one else has access to, the risk may be limited. If it's a corporate repo with hundreds of contributors, someone almost certainly wants to be aware of it. Even then, each organisation will want to respond in different ways, perhaps depending on who has access to the repo, and what access the leaked secret granted.

I'd be remiss not to say that GitHub has a beta offering for private repo secret scanning that we launched in May. It's a paid feature, targeted at large, security-conscious organisations, that scans your git history and each new commit for secrets and displays them in the GitHub UI.

greysteil··on What will happen when you commit secrets to a public Git repo?
The author of sshgit wrote a great post on how it works using the public GitHub API: https://darkport.co.uk/blog/ahh-shhgit!/
greysteil··on What will happen when you commit secrets to a public Git repo?
There are a few considerations on that one, but one very practical reason is the developer experience of dealing with false positives.

False positives are one of the big problems in secret scanning. Some partners issue credentials with patterns that make them very hard to distinguish from innocuous strings. For example, a Datadog token looks identical to a commit SHA. We would never block developers from pushing commits to GitHub just because they had 40 character hexadecimal strings in them!

GitHub's partnership approach works around the false positive problem by having the token issuer check whether a token is real and take action only if it is. However, this is a one-way communication from GitHub - the token issuer doesn't need to tell us whether the candidate secret we sent them was real or not, and in most cases we never know.

As a result, we can't replicate the zero false positive experience in a pre-receive hook (i.e., before the commit is pushed to GitHub). There would also be performance considerations from making 30+ http requests as part of a pre-receive hook.

In future, we are looking at creating a pre-receive hook solution that focuses on patterns that have a very low false positive rate. There are already some open source solutions that do this (links below) - in fact the OP linked to one from his Twitter thread. If/when GitHub offer is, it will definitely be opt-in, rather than opt-out!

* https://github.com/thoughtworks/talisman/

* https://github.com/awslabs/git-secrets

greysteil··on What will happen when you commit secrets to a public Git repo?
Cool experiment!

I PM the secret scanning team at GitHub and wanted to mention what GitHub did behind the scenes here. GitHub scans every commit to a public repo for secrets one of our secret scanning partners may have issued. We forward those candidate secrets to the issuing partner, and they take action. In some cases they auto-revoke the secret (AWS normally does this, I believe), in some cases they notify the user, and in some cases the response is configurable.

I checked that GitHub detects these tokens myself - within 1 second of the commit GitHub had notified AWS and Slack of the leak. AWS and Slack will then have taken action and informed the token owner, which in this case is Thinkst Canary, rather than Andrezj (the OP). I believe AWS normally auto-revoke, but they may have a custom setup with Thinkst Canary's tokens that allows Thinkst to continue to monitor them even once compromised.

Finally, GitHub actually delays the indexing of our search by a couple of seconds to ensure that, for normal cases, our secret scanning partners have time to take action before anyone else can find the tokens.

We're always looking to make secret scanning at GitHub better, so feedback as always welcome. It's also fascinating (and validating!) to see what happens to exposed tokens.

* List of GitHub secret scanning partners: https://docs.github.com/en/free-pro-team@latest/github/admin...

* Thnkst Canary tokens: https://www.canarytokens.org/

greysteil··on Code scanning for security vulnerabilities now available
I had no idea that we do that, but I can try to hunt it down internally for you. Ping me an email - greysteil@github.com.
greysteil··on Code scanning for security vulnerabilities now available
Wow, jinx, this is pretty much identical to the answer I just wrote!
greysteil··on Code scanning for security vulnerabilities now available
PM from GitHub here and author of Dependabot.

It's different.

- Dependabot looks for vulnerabilities in your dependencies, and creates pull requests to update you to fixed versions.

- Code scanning looks for vulnerabilities in your own code. So, for example, if you have written code that takes user input and creates a database instruction from it without escaping it, it will flag that you are introducing an SQL injection vulnerability.

(As an aside, we could definitely improve Dependabot to treat devDependencies differently. You do need to care about vulnerabilities in your devDependencies in _some_ cases (code exfiltration is the obvious one) but not in many - we should to get smarter about distinguishing between those cases.)

greysteil··on Code scanning for security vulnerabilities now available
PM from GitHub here.

We're adding Ruby support to CodeQL (the scanning engine used in code scanning by default). It's our top requested language, and one we use extensively internally. Adding each new language to CodeQL takes about 6-9 months and needs a team to maintain it in perpetuity, which is why we don't have it yet, but we're starting that work now.

The other languages we hear the most demand for CodeQL support on are PHP, Kotlin and Swift. We'll get to all of those - it will just take a little time.

In the meantime, all of the code scanning experiences are extensible, so you can use other scanning engines with it, like Brakeman for Ruby.

greysteil··on GitHub Codescanning
PM for GitHub Advanced Security here.

We use SARIF as the input format so third party code analysis engines can easily integrate with code scanning. Their results can then be shown in the same way that scans using our own CodeQL analysis engine are displayed.

Docs on how we translate each SARIF property into the code scanning display are below:

https://help.github.com/en/github/finding-security-vulnerabi...

(The beta notice on that page is very relevant here - we wanted to build extensibility options into code scanning from its inception, but whilst it is in beta the API won't be 100% stable. We'll do our best to avoid any unnecessary churn.)

greysteil··on GitHub Codescanning
That's exactly the process - there are full docs at the link below, and we're always keen to hear from potential partners.

Please also note that we only automatically send details from _public_ repos to our secret scanning partners.

https://developer.github.com/partnerships/secret-scanning/

greysteil··on GitHub Codescanning
Done - thanks!
greysteil··on GitHub Codescanning
PM for GitHub Advanced Security here.

We handle that with secret scanning - code scanning focusses on static analysis of your code to find vulnerabilities in your code, rather than committed secrets.

We have a partnership with AWS (and many other token issuers) that handles this really nicely. If anything that looks like an AWS credential is committed to a public repo we send it over to AWS - if it's a real token they notify the token's owner (and in some cases automatically revoke the key).

There's full details at https://help.github.com/en/github/administering-a-repository....

greysteil··on GitHub Codescanning
We (GitHub) absolutely plan to expand the list of languages CodeQL supports, and Ruby is a language we'd love to add (we're heavy users of it internally). In the meantime, because code scanning is extensible you can plug in third party analysis engines to scan the languages that CodeQL doesn't support.
greysteil··on GitHub Codescanning
At GitHub we're pretty proud of the scan results from CodeQL. Currently, 70% of alerts flagged in PRs are fixed (rather than marked as a false positive or won't fix). We think we can get that number up to 85%+ as we gather more data and iterative the queries (which are all open source).
greysteil··on GitHub changes how authorship of sqush commits are attributed, breaks workflows
Not sure the revert is fully deployed yet, but it will be soon. This was my error at GitHub - happy to answer any questions about it.
greysteil··on Y Combinator invests in Monzo through its Continuity Fund
They're a bank. Banks have been profitable for hundreds of years. It's not the business model that's being innovated here, it's the execution.
greysteil··on GitHub Package Registry Will Support Swift Packages
Yep - GitHub Package Registry is a set of registries. It should plan nice with as many package managers as possible
greysteil··on I turned my interview task for Google into a startup
This is a really neat idea.
greysteil··on Why Semantic Versioning Isn't (2015)
They do, yep - only post 1.x releases are included.
greysteil··on Why Semantic Versioning Isn't (2015)
So much this. SemVer isn't perfect but it's a lot better than nothing.

In addition, generally speaking folks are pretty good at sticking to it. I've analysed the number from all the updates Dependabot makes to build SemVer compliance scores for packages (https://dependabot.com/compatibility-score/). Running across all packages for the Ruby ecosystem you get:

- Patch releases generally pass CI for 97% of their users

- Minor releases generally pass CI for 95% of their users

- Major releases generally pass CI for 85% of their users

It's not a perfect system, and library maintainers should definitely keep a changelog too (https://keepachangelog.com), but it's a lot better than nothing, or any of the alternatives.

← PreviousPage 3 of 6Next →