Skip to content

Commit

Permalink
Added safe constructor to snake yaml object
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Abarca committed Jun 12, 2024
1 parent 6b47372 commit d629f2f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
import org.rundeck.app.spi.Services;
import org.rundeck.storage.api.PathUtil;
import org.rundeck.storage.api.StorageException;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;

import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
Expand Down Expand Up @@ -664,7 +666,7 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOEx
* @throws ResourceModelSourceException
*/
public void ansibleInventoryList(NodeSetImpl nodes) throws ResourceModelSourceException {
Yaml yaml = new Yaml();
Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));

String listResp = getNodesFromInventory();

Expand Down Expand Up @@ -709,6 +711,7 @@ public String getNodesFromInventory() {
.debug(debug);
}
AnsibleInventoryList inventoryList = this.ansibleInventoryListBuilder.build();
//inventoryList.processVault();

return inventoryList.getNodeList();
}
Expand Down

0 comments on commit d629f2f

Please sign in to comment.