I doubt that the USB interface on the Uno gives you a unique serial number. Any number would be part of the code uploaded to the chip which would therefore be the same amongst multiple Unos.
One approach is the DS2401 "Silicon Serial Number" chip which uses the One-wire interface. That would only require one free pin, and some code (the code would be the problem, possibly).
The least intrusive method, and probably the most reliable, would be to simply read back the code and sum-check it. That is exactly what I do with my chip signature detector. However that only detects (as currently written) the bootloader signature. A fairly minor change and it could MD5-sum the entire sketch code.
Example output:
Signature detector.
Written by Nick Gammon.
Signature = 1E 95 0F
Fuses
Low = FF High = D6 Ext = FF Lock = CF
Processor = ATmega328P
Flash memory size = 32768
Bootloader in use: Yes
EEPROM preserved through erase: Yes
Watchdog timer always on: No
Bootloader is 512 bytes starting at 7E00
Bootloader:
7E00: 02 01 02 03 0405 06 07 08 09 0A 0B 0C 0D 0E 0F
7E10: 02 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
7E20: 02 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
7E30: 02 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
...
7FB0: 02 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
7FC0: 02 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
7FD0: 02 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
7FE0: 02 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
7FF0: 02 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
MD5 sum of bootloader = 56 72 75 2D 5D B5 0D BA 25 10 DF BE 87 D2 A1 27
That MD5 sum (last line) is effectively the signature of that particular bootloader. In fact the most recent version looks them up in a table:
MD5 sum of bootloader = FB F4 9B 7B 59 73 7F 65 E8 D0 F8 A5 08 12 E7 9F
Bootloader name: optiboot_atmega328
So what you could do is, when uploading a sketch, generate a MD5 sum of the hex code. There are fairly simple ways of doing that. Then you could do a "git tag" operation on your source code, and then (using some automated or manual process) remember that a particular MD5 sum of hex code represents the sketch code at a particular moment.
Some sort of database like:
Chip: Uno
MD5 sum: D8 8C 70 6D FE 1F DC 38 82 1E CE AE 23 B2 E6 E7
Sketch: My_robot_sketch_42.ino
Git tag: version666
Now to locate the source from the board, you establish the MD5 sum of the code (by reading it back from the board) and then look it up in your database.