Logic can be used to determine the cause. Porosity is the inability of gas to escape prior to solidification. There are essentially two gases that influence the behavior, nitrogen and hydrogen. Nitrogen is indicative of a lack of shielding. Hydrogen is indicative of the presence of moisture, not counting that which is present in the material. If you think your gas shielding is adequate then check the gas itself. There are other gases and other causes but these predominate.