Any slight weapon damage to something you are targeting will register as hostile and incur an Assault bounty if the target is Clean.
For collateral weapon damage to a starship which is not your target, there are a few thresholds prior to that. A little damage will evoke a comment as you saw, and a bit more will incur a Reckless Weapons Discharge fine (as with a no-fire zone). Occasionally I see this when striking the Power Plant of a Federal Gunship, for it is directly behind the fighter hangar, and the Pilots' Federation does not always recognise the difference between recklessness and a two-for-one.
Conversely, take utmost caution when defending a faction installation, that not a single projectile from your weapons scratches the walls. Ideally, attack nothing unless your volley is pointed away from the installation structure.