Posts

gitlab linux grep fail if found

Background During the log4j vulnerability the need to stop deployments so verification of remediation was complete, therefore, the need to grep a files output of our security scan was needed.  The use of trivy was being used in scanning the docker containers for vulnerabilities.  Another line was simply added to grep for the CVE and exit 1 if found Gitlab Pipelines Content   trivy --exit-code 0 --cache-dir .trivycache/ --no-progress --severity $TRIVY_SEVERITY --vuln-type os,library -i images/\$DT_DEPLOYABLE.tar >> \$DT_DEPLOYABLE.scan.txt   if [ $(grep -c CVE-2021-44228 *.scan.txt) -ne 0 ]; then exit 1; fi

Java JPA

Definition The Java ORM standard for storing, accessing, and managing Java objects in a relational database Usage Scenario To abstract the database communication layer away from the developer, allowing to easily switch the database store vendor About Definition of the Storage Object Annotation on the Class @Entity @Table(name = "group", uniqueConstraints={@UniqueConstraint(columnNames={"groupname"})}) Annotation on the Fields @Id @Column(name = "id") @GeneratedValue(strategy = GenerationType.AUTO, generator = "group_seq_gen") @SequenceGenerator(name = "group_seq_gen", sequenceName = "group_id_seq", allocationSize = 1) @Column(name = "name", length = 64, insertable=true, updatable=false, unique=true) private String groupname;   Object Store Logic Inject EntityManager for use @PersistenceContext(unitName = "group-service-ds") private EntityManager entityManager; Create / Update / Delete public Group create(G...

Golang channels

Definition Channels  are the pipes that connect concurrent goroutines. You can send values into channels from one goroutine and receive those values into another goroutine. Usage Scenario To download multiple files from a server, you can use go routines to asynchronously run an algorithm to download a file, while the channel tells that algorithm what file to download. About Creation Sizing a Channel unlimited ,  but blocking on writing if nothing is listening on other end books := make ( chan string ) limited , blocks writing when channel is full books := make ( chan string , size int ) Writing <- on the right side of the channel is to send the content on the right into the channel *note: since messages sized to unlimited, it will block unless something is reading from the channel, therefore, use of Go-routine is used to asynchronously run that block books := make ( chan string ) go func () { books <- " black lagoon " }() Reading <- on the left side...

ETL Work - Talend

Extract Transform and Load (ETL) is a general concept of how to move data from one system to another.  There are a lot of tools, and a lot of different methodologies to successfully accomplish this.  But I want to touch upon a product and ECO system that I've never heard of before, until 4 months ago. Talend is a open source eclipse project that allows you to design ETL work in a visual capacity.  It stores its' configuration within XML files, and when you are ready to execute, for debugging or production, it then generates java code and compiles it. My group has bought into the entire Talend ECO system, which combines many different open source projects into an nicely integrated product. But I'm a ColdFusion lover, and this blog is about ColdFusion, therefore, there is two integration points that Talend provides. First, if you buy into the ECO System, then you'll get a Administration server that schedules you, and then you can use modules the consume web servic...

Switch from SVN to GIT

I've been using github.com and bitbucket.com for a while now, but less than a year ago, the development group i'm with decided to switch to GIT.  And I was nervous due to the fact that most of the work I did was in solitaire on github and bitbucket.  I never really was on the opposite end where I was managing and supporting other developers with GIT. But Ignoring my nerves, I started to really review best (or common) practices of GIT and how the distributed nature of it.  The distributed nature still scares me a little, due to the fact that one developer could really F'up the central repository (depending on your setup).  Atlassian's Stash was chosen as the GIT managing server, that is due to the fact that it adds features to GIT that you would normally have to do manually.  I'll jump into Atlassian's Stash a little later.  For now, just the SVN to GIT conversion. There are a lot of tutorials on how to migrate your SVN repository into GIT, my article is...

How my world has changed (personally)

In April 2012 doctors found a brain tumor in my 7 year old son, and within a 3 days they removed it.  I try to keep my professional career and personal life separate in many ways.  But I believe something this big should cross those boundaries.  This will be my only post, on my technical blog, so feel free to follow my personal blog if you would like to stay in touch. As of Today, I feel very lucky how the events have turned out, although this trip my family are on hasn't stopped our situation could have been a lot different. I've been trying to compile the events in my personal blog ( www.lonestarbandit.com ).

Railo Frameworks within Subfolders - file not found

I use coldbox, and I am just now looking at using Railo with tomcat on Linux.   I have a development machine where I am loading different test cases into a single web root.  For example /contentBoxTest/ /TestIntranetSite/ /TestPublicSite/ The main handler worked, but all subsequent handler's failed, including modules. I found out that Railo/Tomcat doesn't have the greatest wildcard processor for handling frameworks with SES.  for example /contentBoxTest/index.cfm/help/me So I found that for each subfolder that we want the index.cfm to be processed in a SES way, we have to add a line to the configuration file. For mine, a default install the config file is located at /opt/railo/tomcat/conf/web.xml there is a structure within the xml file with within it mine now looks like this         GlobalCFMLServlet         *.cfm         *.cfml         *.cfc       ...