Hacker News new | past | comments | ask | show | jobs | submit | bewuethr's comments login

I love that graph! So many occurrences of "that's me" or "I know somebody exactly like that".


Shortened commit SHAs are actually not supported by Actions; if you try, you get

"Unable to resolve action `actions/checkout@11bd719`, the provided ref `11bd719` is the shortened version of a commit SHA, which is not supported. Please use the full commit SHA `11bd71901bbe5b1630ceea73d27597364c9af683` instead."


What if the repository has a tag called 11bd719? Does Git/GitHub forbid creation of this tag if a commit exists with that prefix?

What if a Git commit is created that matches an existing tag? Does Git have a procedure to make a new one? e.g. imagine I pregenerate a few million 8 character tags and wait for a collision

btw: Even if you specify the full commit SHA, this can still be attacked; there have been pre-image attacks against Git commit hashes in the past. At least for older versions of Git, the algorithm was Sha1. Maybe that’s changed but an attacker could always construct a malicious repository with intentionally weak hashes with the intent of later swapping one of them. (But at that point they may as well just push the malicious code in the first place.)


What is the attack exactly? Only full commit SHAs are valid to reference a commit by SHA. GitHub disallows tags and branch names that could collide with a full commit SHA. There is never any collision between commit SHAs and tags.


I think the hypothetical attack is to create a tag with the shortened commit SHA pointing at malicious code, and if someone accidentally puts that instead of the full commit SHA, maybe Github will serve them that malicious tag instead of throwing the error. It sounds like that could work if Github doesn't block a tag/branch colliding with a shortened commit SHA. I'd guess they probably do though?


So you would need to specifically write an action referencing an invalid short SHA, which would not work and the action would fail, and then wait for an attacker to push an action with that tag name, and then run your action which has thus far been failing because of the invalid reference?


You'd push the tag at the same time you push the commit. If anyone tries to reference your action and accidentally copies the shortened commit SHA instead of the full commit SHA, they'll reference the malicious tag instead. They'd never see it fail, they'd just silently pick up the malicious tag. But again I'm guessing Github will block that shortened commit SHA as a tag and this wouldn't actually work.


No, I don't think Github blocks shortened commit SHAs as tags.


How could they? They can't block every 8 character tag. And you can push the tag before you push the commit. (You know which short sha to impersonate because you can see it locally.)


> They can't block every 8 character tag.

Whilst Git will be default abbreviate commits to 7 characters, that's merely a default; `core.abbrev` can be set to any number to change the default display. Git will also accept any length abbreviated hashes as long as they're unique in the repo.


It's still SHA-1 by the way, but they included counter-cryptanalysis to reject objects that appear to be one side of a collision using known techniques.


In Ideas That Created the Future [1], a curated and edited set of influential computer science papers, the Leibniz contribution is "The True Method" [2], which I read more or less as "if we could formalize everything, we could use mathematical methods to find answers to all questions".

In the collection of papers, it's picked because of its ideas later formalized in Boolean logic, and logic programming in general.

[1]: https://direct.mit.edu/books/edited-volume/5003/Ideas-That-C...

[2]: https://e-space.mmu.ac.uk/624726/3/The%20true%20method.pdf


The GitHub CLI (https://cli.github.com/) uses Bubble Tea. There's no good way to find popular dependents, but you can browse https://github.com/charmbracelet/bubbletea/network/dependent... to see GitHub repos that import the module.


Just as a note, the GitHub CLI doesn't use bubbletea itself right now, though it does use other charm libraries such as lipgloss and glamour. That said, it's quite likely that at some point we will use huh for our prompting library, which does use bubbletea.


Oh wow, I could have sworn! Did you never use bubble tea and bubbles, or did you remove them at some point?



A rudimentary version of this used to be integrated into Giphy[1], but it seems to be broken now, meaning the market is wide open for this! ;)

[1]: https://giphy.medium.com/the-secret-giphy-slack-commands-9cb...



Here's a diff without the first commit that changed all linebreaks: https://github.com/marijnh/Eloquent-JavaScript/compare/d8290...


There's The Every Computer Performance Book http://www.treewhimsy.com/TECPB/Book.html and the blog it's based on, https://rwwescott.wordpress.com/


There's also a fairly powerful gdb style actual debugger: https://bashdb.sourceforge.net/


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: