The Underground Undercover page on Nukapedia says that
The optional "deposit weapons" objective is completed when a certain number of weapons have been placed in the marked locker. Placing a stack of weapons appears to only count once, so put them in the crate one at a time. (see talk page for speculation)
I took a look at the speculation on the talk page, and it seems people are getting varying results. Taking it all in, it looks to me like you need to put in 10 weapons, but that putting those weapons in is buggy and error-prone. The last comment at the time of writing this seems like it is probably the best advice:
Putting them in one at a time and closing the container between each seems to be the trick. With that method, I had it completed after 10.