Both sentences are grammatically correct.
There are a lot of ambiguities in both wordings (e.g. whose Untätigkeit is meant, or whether inactivity of a robot or injured by a robot is meant), which isn't ideal for a robot law. However, as you wrote, let's set that aside for a while.
There's a subtle difference in what is negated between the two example sentences.
Ein Mensch darf nicht durch Untätigkeit von einem Roboter verletzt werden.
Here, it's either "darf" or "durch Untätigkeit" that is negated by "nicht". It's unclear which one is meant, but in the end, it doesn't make a big difference for the meaning of this sentence.
Ein Mensch darf durch Untätigkeit von keinem Roboter verletzt werden.
Here, ein Roboter is negated (nicht ein Roboter = kein Roboter = no robot).
Here, the ambiguity of "von" leads to two possible interpretations:
(How every human would interpret it:) No human can be injured by a robot due to the human's inactivity. The word order excludes that Untätigkeit refers to the robot here, it clearly refers to the human in this case because it comes before the "injured by no robot" part.
(How no sane person, but every robot would interpret it:) It's ok for a human to be injured as long as it happens by inactivity of no robot, i.e. it's ok if it happens because all robots are active.